<story><title>Performance comparison of Functional C++ 11, Java 8, JavaScript and Wolfram</title><url>http://unriskinsight.blogspot.com/2014/06/fast-functional-goats-lions-and-wolves.html</url></story><parent_chain><item><author>zik</author><text>It&amp;#x27;s pretty astonishing how easily C++ trounces everything else including Java. I guess there&amp;#x27;s still something to be said for compiling directly to optimised binaries.</text></item></parent_chain><comment><author>mtdewcmu</author><text>Supposedly, Java is going to be faster than native code any day now. It&amp;#x27;s been said for years. The case was somewhat credible at one time, because the opportunity exists to optimize using runtime information. I think the reason it didn&amp;#x27;t go that way is:&lt;p&gt;1. CPUs have gotten very good at doing runtime optimization kinds of things on their own, like predicting branches and reducing the cost of virtual function calls.
2. Java only does optimizations that can be done quickly, since the optimizer has to compete with the executing program itself.
3. The claim was overblown to begin with, and Java is trying to do too many other things, like be secure, that interfere with performance.</text></comment>
<story><title>Performance comparison of Functional C++ 11, Java 8, JavaScript and Wolfram</title><url>http://unriskinsight.blogspot.com/2014/06/fast-functional-goats-lions-and-wolves.html</url></story><parent_chain><item><author>zik</author><text>It&amp;#x27;s pretty astonishing how easily C++ trounces everything else including Java. I guess there&amp;#x27;s still something to be said for compiling directly to optimised binaries.</text></item></parent_chain><comment><author>gcv</author><text>Having dealt with trying to make Java run within some reasonable margin of C++11, I&amp;#x27;m not surprised at these results at all. It&amp;#x27;s really hard to make Java go that fast.&lt;p&gt;I&amp;#x27;m instead shocked that the C++ version beat Fortran.</text></comment>