4 ms·
I am curious to know, if there is any explanation for why java performs better than Go.
by ram_rar 9y ago
I am curious to know, if there is any explanation for why java performs better than Go.
- jcelerier 9y ago20 years of optimizing tends to do this
- glibgil 9y agoGo was invented in the 1970s and then placed on the self for 40 years
- jsd1982 9y agoI personally enjoy Go but your comment gave me a chuckle since it's very true. Have your upvote, friend, for whatever they're worth on HN.
- ademarre 9y agoI can't speak to the Java comparison, but the site says they used Go 1.6.3. The SSA back end introduced in Go 1.7 (amd64) came with a nice performance boost. https://blog.golang.org/go1.7 https://blog.golang.org/go1.7
- topspin 9y agoTwo decades of optimization probably account for that. From the paper: Moreover, the top 5 languages that need less energy and time to execute the solutions are: C (57J, 2019ms), Rust (59J, 2103ms), C++ (77J, 3155ms), Ada (98J, 3740ms), and Java (114J, 3821ms); of these, only Java is not compiled. That is an admirable accomplishment. JRE 1.8 has the most efficient "managed" language runtime tested. The PHP result is interesting; they used 7.x which is roughly twice as efficient as older (5.x) versions; PHP 7 was primarily a (successful) effort to improve performance. If you extrapolate the PHP result to the old version (multiply by 2) it's nearly as bad as Perl and among the slowest/most costly. That certainly corroborates Facebook's several PHP re-implementations.
- jaawn 9y agoThe Java performance was the most interesting part of the results for me. I'm glad it got some attention. I have been developing the opinion for awhile that, as an industry, we've become far too avoidant of "pre-mature" optimization. It is astonishing to me how much slower a lot of this stuff is than Java. Granted, I also think considering Java to be "not compiled" is a slight misrepresentation since it does get compiled to Java bytecode.