Java performance

In software development, the programming language Java was historically considered slower than the fastest third-generation typed languages such as C and C++.[1] In contrast to those languages, Java compiles by default to a Java Virtual Machine (JVM) with operations distinct from those of the actual computer hardware. Early JVM implementations were interpreters; they simulated the virtual operations one-by-one rather than translating them into machine code for direct hardware execution.

Since the late 1990s, the execution speed of Java programs improved significantly via introduction of just-in-time compilation (JIT) (in 1997 for Java 1.1),[2][3][4] the addition of language features supporting better code analysis, and optimizations in the JVM (such as HotSpot becoming the default for Sun's JVM in 2000). Sophisticated garbage collection strategies were also an area of improvement. Hardware execution of Java bytecode, such as that offered by ARM's Jazelle, was explored but not deployed.

The performance of a Java bytecode compiled Java program depends on how optimally its given tasks are managed by the host Java virtual machine (JVM), and how well the JVM exploits the features of the computer hardware and operating system (OS) in doing so. Thus, any Java performance test or comparison has to always report the version, vendor, OS and hardware architecture of the used JVM. In a similar manner, the performance of the equivalent natively compiled program will depend on the quality of its generated machine code, so the test or comparison also has to report the name, version and vendor of the used compiler, and its activated compiler optimization directives.

  1. ^ "Java versus C++ benchmarks".
  2. ^ "Symantec's Just-In-Time Java Compiler To Be Integrated Into Sun JDK 1.1". Archived from the original on June 28, 2010.
  3. ^ Cite error: The named reference cnet1998 was invoked but never defined (see the help page).
  4. ^ "Java gets four times faster with new Symantec just-in-time compiler".

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search