Live data from Hacker News

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

benchmarksgame-team.pages.debian.net

31–40 of 114 posts

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

#31
post #11

Earlier quoted context omitted.

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

Yes, use Rider and .net core - everything works on non-windows platforms (working on .net from osx right now, deploying to linux) Avoid vscode for C# development, unlike TS/JS (which is top of the line), the support for C# even in core is toy level.

What do you think is lacking in C# extension for VS Code vs TypeScript? I would expect a better experience with C# (in terms of tooling) because the language is typed.

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

#32
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 nuance does matter which is why we are still having the discussion. Teams can pick which style they want but mixing is unnecessary overhead and when you're talking about 10s or 100s of solutions I'd like the style to match across the board.

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

#33
post #9

Earlier quoted context omitted.

I definitely have run into this, even when using 'server mode' in asp.net core. I never was able to figure out why the C# version of my POC was using so much memory, but rewriting to golang ended up using a very predictable, minimal amount of memory in comparison.

My guess is that golang's GC is optimized for latency at the expense of throughput, limiting the max memory size.

It is, and it’s not directly tunable … the opinion is ‘we’re IO-bound, not compute-bound’.

I spent a chunk of time recently (10s of hours) doing dumb C# vs Go benchmarks - files and networking, and nothing worth taking seriously - just, usually the part about being IO-bound was true. C# is really impressive and was just a little slower with the best async solutions I could come up with. The machinery for async has overhead, so do Go routines and channels … the first-pass, not very performant code was just a little faster and IMHO clearer with Go (but I’m much better with Go /shrug).

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

#34
post #11

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.

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

Especially with lsp-mode, C# on Linux (or Mac) is a great experience.

https://0x85.org/csharp-emacs.html

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

#37

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.

> 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 frameworks:

3.5 => 4.0 => 4.5 => 4.6.2 => [netcore convert]

2.0 => 2.2 => 3.0 => 3.1 => 5.0 => ...

Some of the transitions were a little painful, but the same fundamental product survived the entire trip.

I don't know of many other development ecosystems where you can get away with something like this. If we didn't have the stability this ecosystem has to offer, we would not be in business today.

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

#38
post #31

Earlier quoted context omitted.

Yes, use Rider and .net core - everything works on non-windows platforms (working on .net from osx right now, deploying to linux) Avoid vscode for C# development, unlike TS/JS (which is top of the line), the support for C# even in core is toy level.

What do you think is lacking in C# extension for VS Code vs TypeScript? I would expect a better experience with C# (in terms of tooling) because the language is typed.

It just doesn't work nearly as well - even on simple .NET core solutions created from CLI intellisense chokes up, refactoring doesn't work, it's nowhere near the quality level of TS.

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

#39
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:…

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

#40

Earlier quoted context omitted.

Microsoft created .NET and Azure and a lot of the tooling so the integration is tight, now that it's multi platform and with Rider (multiplatform .NET IDE) being as good as if not better than Visual Studio there is nothing stopping it.

Azure integration is not that great actually. For example .NET 5 support for Azure Functions is a huge breaking change with random issues, missing features and terrible IDE support (you have to launch it through CLI and attach to a PID printed out by the host process to debug a function, you could just debug 3.1 functions) - it's beta quality. I find this a common theme with Azure support and .NET

I agree, the functions story with .NET 5 is a right pain in the arse at the moment. I understand why it's happened, but I want my .NET 5 durable functions!
Post reply on HN