Friday, June 3, 2011

Comparing the performance of C++, Java, Scala and Go

An interesting paper from Google comparing the performance of C++, Java, Scala and Go was presented at the 2011 Scala days.

Conclusion from the paper: "We find that in regards to performance, C++ wins out by a large margin. However, it also required the most extensive tuning efforts, many of which were done at a level of sophistication that would not be available to the average programmer."

And my 2c: If you care about performance, for example if you run in the cloud and memory footprint and CPU directly translate to dollars on your cloud monthly bill, if you like programming and are not afraid of spending energy to design and program efficient algorithms, then C++ is still your best bet.

Sure that requires a bit more thinking and perhaps more sophisticated programmers, but you get what you pay for.

And to all the folks who criticize C++ for being complicated, well... in my opinion it's as complicated as you want it to be. It's really up to you as a programmer to think and keep your code simple and, by the way, there's a lot of complicated Java and Scala code out there too :)

No comments:

The postings on this site are my own and don’t necessarily represent positions, strategies or opinions of my employer IBM.