Live data from Hacker News

Golang vs. C# (.NET 5.0) at Benchmarks Game

benchmarksgame-team.pages.debian.net

71–80 of 114 posts

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#71

I'm not really concerned with such small differences in speed, to be honest. The thing that I look for is: how productive am I when using language X?

... and nothing can compare with C# (under Visual Studio) in this regard, it seems. Not the most efficient at run time, but a good, knowledgeable developer's productivity is insane.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#72
post #3

When you see how much effort it takes to C# and Java to optimize the runtime, there are a lot of people working on that. C# is fast but you see that it uses between 2 and 32 times the memory that Go needs. Overall you can see how fast Go is, it has little optimization compare to C# and it's as fast. Compare this: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... and overly complicated C# version: https:…

"( avx, Intrinsics, etc ... )"

I have to give you credit for trying to apply the Rule of Three to a single criticism.

Of course, I don't really understand how the fact that someone took the time to vectorize the C# submission is supposed to be a mark against C#...

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#73

Earlier quoted context omitted.

The point of the btree example is to test how good programming languages are at allocating tree-like structures that can't be preplanned. It's a valid argument that this is a rare real-world requirement, but it's not contrived to be slower.

> The point of the btree example is to test how good programming languages are at allocating tree-like structures that can't be preplanned. Forcing allocations for every node isn't justified by a desire to demonstrate dynamically sized binary trees. A naive dynamically-sized tree would just keep a list of node buffers and allocate a new node buffer every time the previous one fills up (perhaps with subsequent buffers…

> … a desire to demonstrate dynamically sized binary trees…

Cart before horse — the binary trees are justified by a desire to demonstrate memory allocation.

http://hboehm.info/gc/gc_bench/

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#74
post #48

Earlier quoted context omitted.

> absolutely idiomatic and trivial optimization Which is not accepted for the C# programs either. sync.Pool is accepted — https://benchmarksgame-team.pages.debian.net/benchmarksgame/... > the Go version is expressly contrived to be slower The requirements were contrived in April 2008. afaict Go initial release was March 2012.

> Which is not accepted for the C# programs either. Because C# doesn't benefit from this kind of optimization. Its GC is generational, which means that it has very fast allocations at the expense of high latency. In most applications, lower latency is more important than slower allocations (not least of all because these batch-allocating optimizations are nearly trivial), but these benchmarks don't reflect that at al…

> Because C# doesn't benefit…

C# does provide a memory pool implementation.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#75

I say modern .NET is a marvel of features, development tools, interoperability, performance and even ships with its own cloud environment (Azure). Unfortunately developers who don’t know better judge it by it’s historical association with Windows rather than how powerful it is today.

C# was always the better Java, F# the better Scala.

But for many years, the per seat cost was higher, which scared many away

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#76

I've never understood why folks treat the Benchmarks Game results as indicative nor representative of anything useful. The code specimens they use are often unpolished nor idiomatic, without even commenting on whether they could be made to perform better through Byzantine, careful by-hand optimization. Why does their web site have no contact nor link to where the source code for the project can be checked out, contri…

[deleted]

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#77

I've never understood why folks treat the Benchmarks Game results as indicative nor representative of anything useful. The code specimens they use are often unpolished nor idiomatic, without even commenting on whether they could be made to perform better through Byzantine, careful by-hand optimization. Why does their web site have no contact nor link to where the source code for the project can be checked out, contri…

> I've never understood why…

Perhaps they don't read the website text?

> … no contact nor link…

Search works.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#78
post #71

I'm not really concerned with such small differences in speed, to be honest. The thing that I look for is: how productive am I when using language X?

... and nothing can compare with C# (under Visual Studio) in this regard, it seems. Not the most efficient at run time, but a good, knowledgeable developer's productivity is insane .

Especially with the .NET Standard Library. It has damn near everything already out of the box with 1st class support, and if not there's almost certainly a nuget for it. C# is an extremely productive language to develop for.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#79
post #23

It's 2021 and .NET developers still argue which coding style they should adopt and how they should enforce it. It's totally mind numbing that team members are split between implicit and explicit variable naming. Contrary, in Go you just write code because those nuances should not matter.

That's more of a failure of management. Companies like Google outline style guides for company-wide usage. It might not be "the best" but it's consistent and the company enforces that.

Re: Golang vs. C# (.NET 5.0) at Benchmarks Game

#80

I say modern .NET is a marvel of features, development tools, interoperability, performance and even ships with its own cloud environment (Azure). Unfortunately developers who don’t know better judge it by it’s historical association with Windows rather than how powerful it is today.

C# was always the better Java, F# the better Scala. But for many years, the per seat cost was higher, which scared many away

In what way do you consider F# better than scala? Especially with the recently released, revamped Scala 3?
Post reply on HN