« ArrayList versus LinkedList: Aren't they same? | Main | Who (or What) is slowing down my Java App Startup? »

Java Faster Than C++? -- My favorites from Slashdot discussion

Fascinating discussion on Java and C++ performance (if you can just skip the noise!) at Slashdot. I especially liked the following entries:

  1. Measurements are for compilers and/or JVMs, not languages: Yes, different JVMs have different performance characteristics and different compilers do different level of optimizations. Though, with time, they tend to converge.
  2. Java facilitates optimization at the macro level: Low level languages such as Assembly and C support runtime efficiency at machine instruction level whereas VM based languages like Java (and C#!) support optimization by doing certain tasks (such as GC) when the system is less loaded. Potential of dynamic optimization based on runtime analysis also favors VM based languages.
  3. Given sufficient will (and time), it is possible to optimize C++ code run faster than Java: Includes optimized code for hash table lookups and the measurement times.
  4. Which language is faster -- depends on workload: and also how your program handles that workload.
  5. Inlining in Java: JVM indeed has more information to do better inlining and hence reduce the method call overhead.
  6. Optimize your Java App: Don't rely on JVM for all the optimizations. Application architecture and use of efficient libraries are important for Java as well.


This page contains a single entry from the blog posted on June 18, 2004 12:28 AM.

The previous post in this blog was ArrayList versus LinkedList: Aren't they same?.

The next post in this blog is Who (or What) is slowing down my Java App Startup?.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33