Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Benchmarks "Google has released a research paper that suggests C++ is the best-performing programming language in the market. The internet giant implemented a compact algorithm in four languages - C++, Java, Scala and its own programming language Go - and then benchmarked results to find 'factors of difference'."
Permalink for comment 476971
To read all comments associated with this story, please click here.
pantheraleo
Member since:
2007-03-07

The client-mode VM compiles the code right away and then leaves it at that. It's the server mode that needs a few thousand executions to recompile and optimize critical parts.



Not true. Both the client and server mode JVM to JIT compilation. Also, it typically doesn't take a few thousand executions before JIT can be done.

While the benchmark is rather theoretical, the issues discovered are real and DO affect real world performance.


Some of the issues do, sure. But if I use a different test, I can make Java be 5 times faster than C++. For example, try doing a benchmark with infilife in Java vs. C++. The Java version is literally almost 5 times faster than the C++ version. The reason is because infilife is one of those tests where garbage collection provides a major advantage in that it optimizes memory allocation and deallocation. Sure, if you really want to spend the time on it, you could probably optimize the C++ version to be as fast as the Java version. But the code would be many times larger, and much more complex than the Java version.

The point is, using different code and different operations, I can very easily produce very different results. You can't take one sample like this and try to say that C++ is the fastest language.

Google even admitted in the paper that optimizing the C++ version was very difficult, and that most times those types of optimizations would not be done.

Reply Parent Score: 3