I am as much of a Java fanboy as it gets, but football team level love-hate of languages is stupid. Also, this benchmark is not necessarily applicable to reL world programs.
The CLR provides some access to low level primitives, while the JVM rather hides them. The first choice allows for more optimization by the developer, but that will be explicit and will potentially disallow some automatic ones.
Java on the other hand hides most of these details and depends on a very advanced JIT compiler for most optimizations (like escape analysis), in which way even a decade old program will get magically faster. Of course it is only a crude difference between them, with Java getting primitive types, and CLR continuously improving in JIT and GC.
No.
There was an interesting issue.
The clever trick was disallowed and the programs that used the clever trick were removed.
> … insanely close with double the allocations…
No, what you see is not with double the allocations.
The clever trick was disallowed and the programs that used the clever trick were removed.
Read the program source code.
Especially that my whole comment was actually defending C#, even though I’m not particularly fond of it.
That only works when you make little quoting gestures with your fingers.
There is an interesting issue on benchmarkgame’s repo, where C# is ahead a bit using a clever trick. It basically halves the required allocations. And Java is insanely close with double the allocations.