4 ms·
> but my problem with c# is that it isn't as performant in Linux Any evidence for this? From the benchmark game it seems like c# is more performant than go, an
by aljgz 2y ago
> but my problem with c# is that it isn't as performant in Linux
Any evidence for this? From the benchmark game it seems like c# is more performant than go, and measurements are done on Linux.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- galangalalgol 2y agoI think it is because I generally look at a given benchmark there and don't browse below the "optimized" section to look at solutions that use intrinsics directly. Being able to use intrinsics directly is a great feature, but doesn't fit in with the whole "fast but not so fast I need to worry about safety" theme. When you exclude solutions that use intrinsics, go is faster. I use rust as my daily driver at work and home. I don't think I'd select either go or c# for a project. When I just want something that works, and I'm not worried about performance, rust is easy to use. It is only when I'm trying to squeeze out performance it gets hard. It is hard to convince go that it is safe to skip bounds checks, and while writing intrinsics isn't hard, it isn't very portable and you have to write lots of versions unless you metaprogram it, which I find harder than idiomatic code in any of these languages. Squeezing out performance is easy in c++, even in c++17, but it usually entails doing something that will "probably always be ok". Doing stuff like that repeatedly adds up to frequent issues.
- igouy 2y ago> I generally look at a given benchmark there Which? Just curious. Some-of the spectral-norm programs seem quite similar: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go-csharpaot.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- galangalalgol 2y agoHi! Thanks for the update! I usually look at your curated list of "idiomatic/optimized/non-portable and unsafe" but in the list you noted the c# solutions faster than go had intrinsics.
- Thaxll 2y agoThose benchmarks were debunked, they don't represent anything.
- igouy 2y agoWhere were they "debunked" ? Please share.
- Thaxll 2y agoYou just need to look at the c# implementation.
- igouy 2y agoHere's a Go program and a C# program. Please explain your comment — https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/spectralnorm-go-1.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/spectralnorm-csharpaot-1.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...