O'Reilly logo
  • Ryan Pollock thinks this is interesting:

There are a lot of details about Java that affect the performance of an application, and a lot of tuning flags are discussed. But there is no magical -XX:+RunReallyFast option.

Ultimately, the performance of an application is based on how well it is written. If the program loops through all elements in an array, the JVM will optimize the array bounds-checking so that the loop runs faster, and it may unroll the loop operations to provide an additional speedup. But if the purpose of the loop is to find a specific item, no optimization in the world is going to make the array-based code as fast as a different version that uses a HashMap.

From

Cover of Java Performance: The Definitive Guide

Note

The straight story from Scott Oaks. But we all still want that -XX:+RunReallyFast option!