I can't imagine a better setup for a language flame war :). I really like debating languages, so I hope it doesn't go that direction. One of the standard caveats with this particular benchmark game with respect to Go is idiomatic optimizations are prohibited. To use the btree example, Go's memory management is low latency and non-moving, so allocations are expensive--any Go programmer writing a performance-sensitive…
Golang vs. C# (.NET 5.0) at Benchmarks Game
51–60 of 114 posts
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#52When 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:…
and afaik, .net has record types unlike the jvm (yet) which means java is even worse
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#53I prefer C#. But here the Go code actually looks like normal production code while the C# examples look like something made by a low-level optimization wizard.
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#54I was always under the impression that Go never had a great optimizing compiler. It was never a primary focus given the limited developer resources. I couldn’t find a direct C# to Rust comparison but Rust trying to compete with C++ means performance is a goal, if that’s what you are after. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
> I was always under the impression that Go never had a great optimizing compiler. It was never a primary focus given the limited developer resources. It's an intentional choice, that's why it compiles code so fast. Also because of that it's a lot simpler than say GCC. Before Go, the Plan 9 C compiler was designed in a similar manner too (I think the Go compiler was forked from it). I think the simplicity aspect is e…
I very much want my computer to work as hard as it can to make my code more performant for free. What I would like to see more is a separate debug and release build mode, where the former can go as fast as it can without optimizations, while the latter can be as slow as it wants and result in the most optimal binary it can produce. Zig does that for example.
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#55Is there one similar for c# vs scala?
Many years ago — but from version-to-version too many of the Scala programs suffered bad bitrot, failed and were not updated.
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#56I 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.
> Unfortunately developers who don’t know better judge it by it’s historical association with Windows rather than how powerful it is today. Some of us actually got to experience the entire journey from the old to new world first-hand. We started out as a .NET 3.5 Framework solution (windows only), and are now looking at a .NET 6 upgrade (any platform). Over the course of 7+ years, we went through all of the following…
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#57I 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.
Can you now get the full .NET development experience in a Linux-only environment? I haven't used it in a while, but from using Unity (game engine) it seemed like C# on Linux was a bit crippled
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#58Earlier quoted context omitted.
Are we looking at the same file?[0] Tons of very "interesting" attributes like this: // prevent inlining into main to decrease JIT time to generate main [SkipLocalsInit][MethodImpl(NoInlining)] [SkipLocalsInit][StructLayout(LayoutKind.Explicit, Pack = 32)] [SkipLocalsInit][MethodImpl(AggressiveOptimization | NoInlining)] [FieldOffset(32)] and tons of "unchecked" blocks. Not to mention that the entire file is using ex…
Agree - those attributes are definitely “low level” and not idiomatic in most situations. I must have missed them skimming that file. For the particular case of n-body you could argue you are already in a pretty extreme HPC world and doing it without vectors would basically be a toy calculator. The problem then of course that C# isn’t really ever idiomatic for that. The question (as alaways) becomes about what to com…
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#59I can't imagine a better setup for a language flame war :). I really like debating languages, so I hope it doesn't go that direction. One of the standard caveats with this particular benchmark game with respect to Go is idiomatic optimizations are prohibited. To use the btree example, Go's memory management is low latency and non-moving, so allocations are expensive--any Go programmer writing a performance-sensitive…
Re: Golang vs. C# (.NET 5.0) at Benchmarks Game
#60When 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:…
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...