3 ms·
>> Go is known to be quite slow I understood it was comparable to Java or C#, both of which are extremely fast - both in terms of execution speed and more so i
by CraigJPerry 5y ago
>> Go is known to be quite slow
I understood it was comparable to Java or C#, both of which are extremely fast - both in terms of execution speed and more so in terms of developer productivity.
The benchmarks I’ve seen generally back that up
https://plummerssoftwarellc.github.io/PrimeView/report?id=davepl-1642852131.json&hi=False&hf=False&hp=False&fi=&fp=&fa=&ff=&fb=&tp=False&sc=pp&sd=True https://plummerssoftwarellc.github.io/PrimeView/report?id=da...
9th overall - faster than c++ for example in Dave Plummers primes benchmark. I quite like that benchmark because it’s really just a bunch of memory operations, a decent view of the compilers ability to generate decent code. Although my concern with this benchmark is that not all languages got the same optimisation effort. Looking at git commits, it seems like rust got almost more optimisation effort than every other language combined.
Also i don’t like the unfiltered view of that benchmark - lisp comes out fastest language of all but that’s because languages like c++ and Rust can only really pre calculate results at compile time (constexpr etc) - whereas that lisp implementation is doing everything before compilation. Unfair because other languages don’t have a programmable precompilation reader phase.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
In the area of java, Swift etc i don’t like these benchmarks at all though. The c# one for example often relies on c libraries or vector intrinsics etc so it’s not really like for like.
https://www.techempower.com/benchmarks/#section=data-r20&hw=ph&test=composite https://www.techempower.com/benchmarks/#section=data-r20&hw=...
Between java and c#
- igouy 5y ago> … not really like for like… Except when it is: this C# program seems to have been transliterated from the Java program — mandelbrot C# .NET #5 https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/mandelbrot-csharpcore-5.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... mandelbrot Java #2 https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/mandelbrot-java-2.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... And in the listing — https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/mandelbrot.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- CraigJPerry 5y agoThat highlights my point pretty well - you've chosen one of the c# impls that doesn't use anything more than a few compiler hints but it's slower than the java solution. However if you look at the overall results, c# is about 25% faster on mandlebrot, and when you peek under the covers - https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/mandelbrot-csharpcore-1.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... - you find it's using AVX vector instructions. Not like for like in the summary view which is why i think those results are misleading.
- igouy 5y ago> … slower than the java solution. !! 4.10s Java #2 4.11s C# .NET #5 ---- > … overall results, c# is about 25% faster on mandlebrot… You say "overall results" but the webpage says — "Always look at the source code. These are only the fastest programs."