JVM Tutorials - Herong's Tutorial Examples - Version 4.23, by Dr. Herong Yang
"float" Operations without JIT Compilation
This section provides performance test results of 'float' operations without JIT compilation - interpreted-only mode.
Let's start with the interpreted-only mode on "float" operations using these parameters to control my tests:
Here are test results:
C:\herong\jvm>java -Xms100m -Xmx100m -Xint BenchmarkRunner BenchmarkTestFloat emptyLoop 10000 100 1000000 ... Runs: 100, Ave: 17, Min: 17, Max: 17 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m -XX:+PrintCompilation BenchmarkRunner BenchmarkTestFloat assignment 10000 100 1000000 ... Runs: 100, Ave: 19, Min: 19, Max: 21 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m -XX:+PrintCompilation BenchmarkRunner BenchmarkTestFloat add 10000 100 1000000 ... Runs: 100, Ave: 33, Min: 33, Max: 36 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m -XX:+PrintCompilation BenchmarkRunner BenchmarkTestFloat multiply 10000 100 1000000 ... Runs: 100, Ave: 29, Min: 29, Max: 32 - Per step in nanoseconds C:\herong\jvm>java -Xms100m -Xmx100m -XX:+PrintCompilation BenchmarkRunner BenchmarkTestFloat division 10000 100 1000000 ... Runs: 100, Ave: 35, Min: 35, Max: 35 - Per step in nanoseconds
Surprisingly, the multiply loop runs faster than the add loop!
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
►Micro Benchmark Tests on "float" and "double" Operations
Benchmark Test Methods for "float" Operation
►"float" Operations without JIT Compilation
"float" Operations with JIT Compilation
Benchmark Test Methods for "double" Operation
"double" Operations without JIT Compilation
"double" Operations with JIT Compilation