by CyanLite4 · 4y ago · 0 comments
Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.
The part that keeps me hooked is the fact that I can stand up something capable of producing those numbers in 30 lines of code using 1st party dependencies only. I can then have a full prototype to demo by late afternoon, again having antagonized over exactly zero 3rd parties.
For me, the performance numbers aren’t just about speed while in production. It’s also about speed to production. Having the confidence that it’s almost certainly going to be fast enough by default keeps me from worrying about optimizing random bullshit throughout.
I still haven’t seen anything that comes remotely close to the combination of speed and stability offered here. I do some pretty nasty things with the runtime and it just copes. GC seems like pure magic now too. I continue to avoid things like LOH allocations with streams, but I don’t worry about it like I used to in the 4.x days.
I like Rails (vintage, Rails 5). Unfortunately DotNet and EF combined now have virtually the same productivity but with massively better performance. Which is a shame as Ruby is a great language.
A language can't be the fastest at everything in today's mature language ecosystem. OTOH, Debian's "Programming Language Games" benchmarks shows it's on par with Java (which is not slow in any means), and not as fast as you claim [0].
In the page I shared, some C# benchmarks are impressively fast, because they are written with explicit hand crafted SSE3/AVX vectors, which a run of the mill programmer won't want to touch (for most of the time, anyway).
Comparing .NET Core, which is a hybrid JIT language with purely interpreted ones like NodeJS and Python also makes no sense at all, considering Python Compiler does not do any optimizations whatsoever, and is still confined to a single core per process unless you pull some tricks.
Choosing horses for courses is fine, and we all shall do it, but claiming a language as winner over a single benchmark suite, including the one I referenced is wrong.
Choose what works best for you.
[0]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework. Frameworks like drogon or just-js are impressive feats of engineering, but the only reason they exist is so that their authors can mention that on their resume. If you run them in production, you are on your own.
There's equally fast Vert.x, which you can buy support from Red Hat for, but most Java shops use Spring Boot (vmware or Red Hat support available), which is easier, but hopelessly slow in comparison.
That proves my point even further, because I don't develop anything remotely web-related, hence that performance scenario is completely moot for me.
> What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework.
Again, the same because the software I develop is not "Enterprise" either.
What I develop is scientific software, and needs to be extremely performant. In my case C++ is the best language, but it's not the best for every case. This is why I also learn Go and use Python for other tasks.
In my case, Debian's benchmarks are directly related to my use cases, however even that's not a definitive measurement for my case. It's just a bunch of data to keep in mind.
I hope you realize non-web development is a niche nowadays. So it's perfectly reasonable to prioritize .NET benchmarks that target ASP.NET Core web apps/APIs.
It's not only their stance against Linux only, but everything competing with them.
I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor which openly kills this interoperability and try to corner market with underhanded tactics.
It's not limited to Microsoft, though. I use Java because there's OpenJDK, Go because there's gcc-go toolchain, etc. Similarly I don't use Rust because it's LLVM only for now.
However, this doesn't mean that I want these to disappear. I want them to compete fairly, so we can improve. I'm not a web-dev so I have no need for this frameworks, but I'd make similar choices if I enter to that arena, too.
Which is mostly (~95%) developed by Oracle and is about the same in its openness and community participation as
https://github.com/dotnet/runtime/
is.
Or maybe you meant OpenJ9?
FWIW I also use Linux exclusively, develop (and host) dotnet applications on it, and have my own gripes with it (mostly with Linux still being treated as a second-tier platform which is only good for servers as far as MS is concerned — I'm not talking about the abomination that VS is — try to compare the official profiling & debugging tooling).
I'm curious, what do you have against LLVM? I'm sure it supports fewer backends than GCC, no surprise given their relative ages, but it's still got quite a few and it's open enough that it has documented support for adding new backends.
In proper society, the population would get to vote on the initiatives they care about.
They are still running this strategy, but now also buy good PR buying paying high profile developers thru their developer advocate positions.
""" Microsoft finally is fulfilling its dream of EEE to Linux. Windows Subsystem for Linux (WSL) embraced the API – letting you run Linux binaries (and GUIs!) on Windows natively. Next, WSL extended the kernel with GPU driver support. "" " - https://matt-rickard.com/embrace-extend-extinguish/
Thanks for reminding, BTW. :)
Java and C# are very similar languages.
That's not true atm.
At time of writing (TechEmpower 21) Rust frameworks have top 3 out ouf 5 slots (#2, #3 and #5) in composite rankings. https://www.techempower.com/benchmarks/#section=data-r21&tes...
Which goes to show, benchmarks change and depend on use case. And Rust is very competitive (in league with C/C++).
I don't get this. If you want to write C#, write C#. If you want to write Go, just write Go.
Go is a great language because of its simplicity and ecosystem, has lots of useful things in the standard library, has pretty good runtime performance and also compiles to static executables easily (which is especially useful for projects like Nomad). It's both a good fit for web development, as well as writing smaller or larger utilities. Honestly, its packaging situation is leaps and bounds ahead of something like Python, so I predict great future for it in DevOps too.
C# is a more advanced language with a rich history and a lot of the functionality for web development in particular coming as first party packages. Some of that historical baggage weighs it down and the complexity can be annoying, but ASP.NET Core, EF Core, Kestrel and many other components are great. Plus, running on *nix is good, even though the single executable/runtime/deployment situation isn't quite as easy as with Go.
Write code in whatever technologies work for you. My caveat to add would be that I'd (almost) always develop front end and back end separately, since the React/Angular/Vue webapp really shouldn't care much about what technologies are behind the APIs. Of course, being able to use a single language for both FE and BE development is also a worthwhile approach!
That’s because my argument has nothing to do with the language itself but you still felt compelled to write an essay. I’m saying the modern Linux-based tooling, ecosystem, and devex of C# is inferior to so many other choices.
Hence the exploration of the good things about each of the languages and genuine reasons why people might enjoy using them for slightly different use cases.
At the end of the day, everyone can make that choice for themselves, unless their org makes it for them.
https://news.ycombinator.com/reply?id=32220935&goto=item%3Fi...
(Also the benchmarks are a cheat, look at the source code of C# vs the source code of Go or Java)
I also thought their benchmark is a cheat. But it is not. It is testing exactly what the benchmark was testing in that scenario. That is why TechEmpower Benchmark suite is so powerful. It uses different web server scenarios (connection, JSON parsing, database connections, ...). The different test case implementation .NET and others have are making sure no other factor is influencing this. For example: when you benchmark connections why dealing with MVC, validation and database connections.
It is not .NET who cheats, it is the others who do not properly isolate the tested performance aspect.
And to make the comparison a bit more real and day-to-day applicable, you need to pick the right framework configuration (like aspcore-mw @ 80% / aspcore-mvc @ 37%) and compare with other reasonable scenarios (like express @ 1% / spring @ 2% / quarkus @ 8%). Both are then far of the top 10 ten list but still comparable. The top 10 combinations are for cases where developer productivity does not matter but throughput is the key (e.g. a DoH resolver or a system like a Cache / Database).
I preferred the C# from 15 years ago compared to whatever is going on over there at present. If you're already indoctrinated into the ecosystem, I'm sure it's fine. Otherwise, buckle up - things are going to get choppy.
[1]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...
[2]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...
Most languages copy c#