Performance comparison of C++,Java,Scala & GO

Recently, a Googler wrote a research paper that compares the performance of Loop recognition algorithm in four different languages named as C++, Java, Scala & GO. Those  who are not familiar with Scala[1] and GO[2] can read them in detail using the attached references. Scala is based on JVM and it supports both functional and object oriented capabilities and its code is more compact than Java. GO is a compiled, garbage-collected, concurrent pro-
gramming language developed by Google Inc [2].

The end conclusion of the paper was that the C++ performance is much better than all other languages.¬†Scala stood second in the list. But when Code optimization was performed then GO outperformed C++[4]. Even Java Code optimization googler Jeremy also stopped optimizing the Java code because “many of the C++ optimizations would apply to the Java code version as well” [3]. This lead to controversies in the paper as many people now have pointed out flaws in the paper and suggested improvements. You can find this paper from here.

[1] Scala

[2] GO

[3] Jeremy Manson, Java code optimizer comments

[4] Cade Metz, article in The Register

Advertisements
Posted in Java | 1 Comment

Java Concepts

Thread Safety:

It is a computer programming concept used in the Multi-threading. A piece of code is thread safe if it functions correctly during simultaneous execution by multiple threads [1].

References:

  1. http://en.wikipedia.org/wiki/Thread_safety
Posted in Java | 1 Comment