News for hackers. Stuff that matters.
Re:Google paper comparing performance of C++, Java, Scala, a... by CCs on Friday June 03, 2011 @12:53AM (#2615194)
So C++ wins the performance test by large margin, Scala follows (3.6x), then Java 64bit (5.8x), Go (7x) and finally Java 32bit (12.6x).

Scala without any optimization is still better than Java with all the ninja-skills black magic applied. Scala optimized is pretty good - "just" 2.5x slower than C++

Re:Google paper comparing performance of C++, Java, Scala, a... by arron61 on Friday June 03, 2011 @01:04AM (#2615215)
Actually it's odd. They say that in the Java tuning, they made some simple optimization that got it on par to the original C++ one but then they refused to do anything further; noting instead the same C++ optimization would have applied in Java as well.

Does that mean the java version would have been just as fast? It seems in general though that Java is just as fast as C++ unless you are an ultimate C++ expert.

Re:Google paper comparing performance of C++, Java, Scala, a... by johnm on Friday June 03, 2011 @01:47AM (#2615304)
Indeed, this is ridiculous and makes their final conclusions weaker.
Re:Google paper comparing performance of C++, Java, Scala, a... by wtracy on Friday June 03, 2011 @03:40AM (#2615505)
Maybe I'm missing something, but I'm amazed to see Scala beating out Java.
Re:Google paper comparing performance of C++, Java, Scala, a... by jshen on Friday June 03, 2011 @12:39PM (#2617008)
Regarding the java version, "Note that Jeremy deliberately refused to optimize the code further, many of the C++ optimizations would apply to the Java version as well"
Re:Google paper comparing performance of C++, Java, Scala, a... by gaius on Friday June 03, 2011 @06:40AM (#2615811)
Why? Remember that at this point in history, Java-the-language and Java-the-VM are related in name only.
Re:Google paper comparing performance of C++, Java, Scala, a... by jbooth on Friday June 03, 2011 @02:41PM (#2617514)
From a performance perspective, the VM is what dominates and Java operates closer to the VM assumptions about what it's going to run.

If you read the paper, you'll note that the Scala author significantly changed the structure of the algorithm to conform with the way Scala does things (recursion, etc). So it's sort of an apples-to-oranges comparison as far as Scala's concerned, too bad they couldn't write ugly Scala code that would give a better comparison.