# JMH version: 1.37 # VM version: JDK 25.0.5, OpenJDK 64-Bit Server VM, 25.0.5+8-LTS # VM invoker: /tmp/tools/jdk-25.0.5+8/bin/java # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) # Warmup: 3 iterations, 1 s each # Measurement: 8 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: com.ankurm.jmhbasics.ForkingBenchmark.measure_1_c1 # Run progress: 0.00% complete, ETA 00:00:33 # Fork: N/A, test runs in the host VM # *** WARNING: Non-forked runs may silently omit JVM options, mess up profilers, disable compiler hints, etc. *** # *** WARNING: Use non-forked runs only for debugging purposes, not for actual performance runs. *** # Warmup Iteration 1: 1.169 ns/op # Warmup Iteration 2: 0.972 ns/op # Warmup Iteration 3: 0.891 ns/op Iteration 1: 0.797 ns/op Iteration 2: 1.058 ns/op Iteration 3: 0.842 ns/op Iteration 4: 0.892 ns/op Iteration 5: 0.870 ns/op Iteration 6: 1.155 ns/op Iteration 7: 0.884 ns/op Iteration 8: 0.800 ns/op Result "com.ankurm.jmhbasics.ForkingBenchmark.measure_1_c1": 0.912 ±(99.9%) 0.244 ns/op [Average] (min, avg, max) = (0.797, 0.912, 1.155), stdev = 0.128 CI (99.9%): [0.668, 1.156] (assumes normal distribution) # JMH version: 1.37 # VM version: JDK 25.0.5, OpenJDK 64-Bit Server VM, 25.0.5+8-LTS # VM invoker: /tmp/tools/jdk-25.0.5+8/bin/java # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) # Warmup: 3 iterations, 1 s each # Measurement: 8 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: com.ankurm.jmhbasics.ForkingBenchmark.measure_2_c2 # Run progress: 33.33% complete, ETA 00:00:22 # Fork: N/A, test runs in the host VM # *** WARNING: Non-forked runs may silently omit JVM options, mess up profilers, disable compiler hints, etc. *** # *** WARNING: Use non-forked runs only for debugging purposes, not for actual performance runs. *** # Warmup Iteration 1: 1.287 ns/op # Warmup Iteration 2: 1.593 ns/op # Warmup Iteration 3: 2.833 ns/op Iteration 1: 3.000 ns/op Iteration 2: 2.695 ns/op Iteration 3: 2.754 ns/op Iteration 4: 2.416 ns/op Iteration 5: 2.173 ns/op Iteration 6: 2.287 ns/op Iteration 7: 2.217 ns/op Iteration 8: 2.100 ns/op Result "com.ankurm.jmhbasics.ForkingBenchmark.measure_2_c2": 2.455 ±(99.9%) 0.620 ns/op [Average] (min, avg, max) = (2.100, 2.455, 3.000), stdev = 0.324 CI (99.9%): [1.835, 3.075] (assumes normal distribution) # JMH version: 1.37 # VM version: JDK 25.0.5, OpenJDK 64-Bit Server VM, 25.0.5+8-LTS # VM invoker: /tmp/tools/jdk-25.0.5+8/bin/java # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) # Warmup: 3 iterations, 1 s each # Measurement: 8 iterations, 1 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: com.ankurm.jmhbasics.ForkingBenchmark.measure_3_c1 # Run progress: 66.67% complete, ETA 00:00:11 # Fork: N/A, test runs in the host VM # *** WARNING: Non-forked runs may silently omit JVM options, mess up profilers, disable compiler hints, etc. *** # *** WARNING: Use non-forked runs only for debugging purposes, not for actual performance runs. *** # Warmup Iteration 1: 2.188 ns/op # Warmup Iteration 2: 2.224 ns/op # Warmup Iteration 3: 2.666 ns/op Iteration 1: 2.274 ns/op Iteration 2: 2.184 ns/op Iteration 3: 2.297 ns/op Iteration 4: 2.201 ns/op Iteration 5: 2.344 ns/op Iteration 6: 2.517 ns/op Iteration 7: 2.654 ns/op Iteration 8: 2.302 ns/op Result "com.ankurm.jmhbasics.ForkingBenchmark.measure_3_c1": 2.347 ±(99.9%) 0.307 ns/op [Average] (min, avg, max) = (2.184, 2.347, 2.654), stdev = 0.161 CI (99.9%): [2.040, 2.654] (assumes normal distribution) # Run complete. Total time: 00:00:33 REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial experiments, perform baseline and negative tests that provide experimental control, make sure the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. Do not assume the numbers tell you what you want them to tell. NOTE: Current JVM experimentally supports Compiler Blackholes, and they are in use. Please exercise extra caution when trusting the results, look into the generated code to check the benchmark still works, and factor in a small probability of new VM bugs. Additionally, while comparisons between different JVMs are already problematic, the performance difference caused by different Blackhole modes can be very significant. Please make sure you use the consistent Blackhole mode for comparisons. Benchmark Mode Cnt Score Error Units ForkingBenchmark.measure_1_c1 avgt 8 0.912 ± 0.244 ns/op ForkingBenchmark.measure_2_c2 avgt 8 2.455 ± 0.620 ns/op ForkingBenchmark.measure_3_c1 avgt 8 2.347 ± 0.307 ns/op