JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
"int" Loops with JIT Compilation
This section provides a tutorial example on benchmark testing of 'int' operations in loops with JIT compilation.
We have tested both "int" and "long" operation loops in interpreted-only mode.
Now let's repeat those "int" test methods with JIT compilation and these parameters:
Here are test results:
C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt emptyLoop 10000 100 1000000 ... Runs: 100, Ave: 1, Min: 1, Max: 1 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt assignment 10000 100 1000000 ... Runs: 100, Ave: 2, Min: 2, Max: 2 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt shift 10000 100 1000000 ... Runs: 100, Ave: 1, Min: 1, Max: 1 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt add 10000 100 1000000 ... Runs: 100, Ave: 1, Min: 1, Max: 1 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt multiply 10000 100 1000000 ... Runs: 100, Ave: 1, Min: 1, Max: 1 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m BenchmarkRunner BenchmarkTestInt division 10000 100 1000000 ... Runs: 100, Ave: 14, Min: 14, Max: 14 - Per step in nanoseconds
Note that:
Last update: 2010.
Table of Contents
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
JRockit JVM 28.2.7 by Oracle Corporation
Memory Management and Garbage Collectors
JVM Stack, Frame and Stack Overflow
Thread Testing Program and Result
CPU Impact of Multi-Thread Applications
I/O Impact of Multi-Thread Applications
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