4 ms·
Those are the first results of the renewed interest from Microsoft to contributing to the JVM cf https://news.ycombinator.com/item?id=21837508 https://news.ycom
by The_rationalist 6y ago
Those are the first results of the renewed interest from Microsoft to contributing to the JVM cf https://news.ycombinator.com/item?id=21837508 https://news.ycombinator.com/item?id=21837508
I wonder what others lovely optimizations/improvements they will bring :}
Especially which optimizations from the C# world will they transpose to the JVM world.
According to the benchmarckgame C# is the fastest on earth JITed language
- dangets 6y agoThere is a JEP to support Java on windows on AARCH64. http://openjdk.java.net/jeps/8248496 http://openjdk.java.net/jeps/8248496
- wokkel 6y agoThe benchmarkgame result are comparing apples to oranges. I stopped after seeing them tests Java regexes tot c# regexes which uses the native pcre library. In my professional experience, the .net jit is nearly always slower than the jvm one.
- ygra 6y agoWith .NET 5 the fastest non-PCRE C# regexredux implementation there completes in five seconds on my machine, as opposed to 8 seconds for the Java implementation. Still quite a bit away from C, but I'd say respectable for a purely managed implementation. It helps that the team has done a lot of optimizations for regex and other parts of the standard lib in the past few months.
- igouy 6y ago> I stopped… You stopped without providing any alternative data beyond — .net is slower because I say it's slower. You stopped without telling us about the benchmarks game C# program which uses System.Text.RegularExpressions
- mindB 6y agoIf you take the benchmarks game as gospel, Julia is faster than C# in aggregate.
- The_rationalist 6y agoI checked and while I didn't do the maths, Julia only beat C# in 2 benchmarcks,overall C# must be faster even if those Julia benchmarcks beats Java!
- eggsnbacon1 6y agoBenchmarks game doesn't do JIT warmup, which is extremely frustrating. The results are useless for long running server applications. It essentially benchmarks which VM can compile fairly fast code quickly, not which one produces the fastest code. Long running VM's like Hotspot in "server" mode do a lot of expensive optimizations over time. Benchmarks game makes no attempt to warm up these VM's, so it doesn't actually measure how fast a VM is in practical hosting scenarios. Anecdotally, I have heard that Java is still faster than C# in most benchmarks when both VM's have had time to do a full JIT. I've also heard that Golang is much slower than C# and Java when their JITs are allowed to fully warm. I've been meaning to build a "warmed up" version of benchmarks game specifically for testing VM languages but never got around to it. If someone else wants to pick up the torch I would be eternally grateful!
- igouy 6y agoYou haven't done a "warmed up" version of benchmarks game — so you don't know how much or how little difference it would make for those tiny tiny programs. https://benchmarksgame-team.pages.debian.net/benchmarksgame/sometimes-people-just-make-up-stuff.html#jvm-startup-time https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- eggsnbacon1 6y agoFor fast languages like C# and Java many benchmarks are finished in a few seconds. By their tests, the warmup adds ~.3 seconds to these tiny programs. That's a long time, 10-20% in some benchmarks! In a couple benchmarks Java would probably be faster than C++ if the JVM was allowed to warm up
- igouy 6y ago> In a couple benchmarks Java would probably be faster… Please be specific. JMH timing for that spectral-norm program was 0.175s to 0.283s faster than the 4.29s elapsed time (16s cpu time). That's not 10-20% it's 6.6%. At best that might put the best Java spectral-norm program a little faster than the best Haskell program. At best that might mean the best Java spectral-norm program took 2x (twice as long as) the best C++ program. https://benchmarksgame-team.pages.debian.net/benchmarksgame/q6600/performance/spectralnorm.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... > … would probably be faster… Please take those tiny tiny programs and JMH and make your own measurements — you might believe measurements you make yourself.