Performance Improvements of JIT Compilation

This section provides a performance comparison between interpreted-only mode and JIT compilation mode on loops with different operations. The JIT compiler improves performance a lot!

If you compare testing results between interpreted-only mode and JIT compilation mode, you will see performance improvements produced by the JIT compiler.

This table provides execution time of different "int" loops per step in nanoseconds:

                        int         int
                Interpreted         JIT
                       Only Compilation
Empty loop               16           1
Assignment: x=i          14           2
Shift: x=i<<1            17           1
Add: x=i+i               17           1
Multipply: x=i*3         17           1
Divide: x=i/3            19          14 

This table provides execution time of different "long" loops per step in nanoseconds:

                       long        long
                Interpreted         JIT
                       Only Compilation
Empty loop               25           2
Assignment: x=i          24           3
Shift: x=i<<1            30           4
Add: x=i+i               34           3
Multipply: x=i*3         38           4
Divide: x=i/3            53          24 

Conclusion:

Last update: 2010.

Table of Contents

 About This Book

 Downloading and Installing JDK 1.8.0 on Windows

 Downloading and Installing JDK 1.7.0 on Windows

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 Sun's JVM - Java HotSpot VM

 JRockit JVM 28.2.7 by Oracle Corporation

 JVM Runtime Data Areas

 Memory Management and Garbage Collectors

 Garbage Collection Tests

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 Micro Benchmark Runner and JVM Options

 Micro Benchmark Tests on "int" Operations

 Micro Benchmark Tests on "long" Operations

Micro Benchmark Tests in JIT Compilation Mode

 "int" Loops with JIT Compilation

 "long" Loops with JIT Compilation

Performance Improvements of JIT Compilation

 Micro Benchmark Tests on "float" and "double" Operations

 Outdated Tutorials

 References

 PDF Printing Version