Comment Re:Sloppy and Questionable (Score 1) 670
Sure - but there are a few things to note.
1. The flags used are in their own Makefiles. Also, these days, it really is not very sensitive. Most decent compilers have very little variation in performance when twiddling with detailed optimization flags.
2. The later Intel chips are enormously more important to anyone alive, and are more representative of real figures that will be observed, anyway.
3. It still seems extremely notable that the Java versions - both simple and optimized - outperformed the C++ version.
The last point is critical. It turns the whole article on its head. Instead of supporting all of the "of course, this is obvious" comments, it makes this a notable result. Even with very poor programming, the Java version outperforms the tuned C++ version on modern hardware.
(And, definitely, the Java version was not written by a Java expert. It spews heap like crazy, uses Integer wrapped objects, uses generics where specialized primitive collections really need to be used, uses a custom set implementation that linearly scans the list on every insert, uses LinkedList where an ArrayDequeue or similar should be used, etc.)
Any test like this wouldn't even be noted anywhere if it wasn't from Google, of course. It would be nice to have available the context which makes the results so radically different from anything realistic. (The only information we get is the "Pentium IV" bit, and a Java flag that does not actually exist.) I suspect that in addition to being run on antique hardware, it was also run with a JVM from 8 years ago.