Files
java-core-examples/jmh-basics/output/08-sum-param.txt
T
asmhatreandClaude Sonnet 5.5 db129fb1ce jmh-basics: JMH tutorial module (dead-code elimination, Blackhole, constant folding, warmup/forks, state scopes, -prof gc)
Eight benchmark/demo classes, a deterministic test suite, and 12 captured output files
generated by scripts/run-all.sh on JDK 25.0.5 (Temurin) with JMH 1.37.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6Fj2JNt7dRev4pZPe
2026-11-08 18:31:11 +00:00

109 lines
4.2 KiB
Plaintext

# 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: 5 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.SumBenchmark.sum
# Parameters: (size = 10)
# Run progress: 0.00% complete, ETA 00:00:24
# Fork: 1 of 1
# Warmup Iteration 1: 11.152 ns/op
# Warmup Iteration 2: 9.349 ns/op
# Warmup Iteration 3: 11.239 ns/op
Iteration 1: 11.426 ns/op
Iteration 2: 11.575 ns/op
Iteration 3: 11.528 ns/op
Iteration 4: 8.986 ns/op
Iteration 5: 10.091 ns/op
Result "com.ankurm.jmhbasics.SumBenchmark.sum":
10.721 ±(99.9%) 4.427 ns/op [Average]
(min, avg, max) = (8.986, 10.721, 11.575), stdev = 1.150
CI (99.9%): [6.294, 15.149] (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: 5 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.SumBenchmark.sum
# Parameters: (size = 1000)
# Run progress: 33.33% complete, ETA 00:00:16
# Fork: 1 of 1
# Warmup Iteration 1: 72.906 ns/op
# Warmup Iteration 2: 61.956 ns/op
# Warmup Iteration 3: 60.801 ns/op
Iteration 1: 53.346 ns/op
Iteration 2: 57.255 ns/op
Iteration 3: 52.866 ns/op
Iteration 4: 54.738 ns/op
Iteration 5: 54.117 ns/op
Result "com.ankurm.jmhbasics.SumBenchmark.sum":
54.465 ±(99.9%) 6.611 ns/op [Average]
(min, avg, max) = (52.866, 54.465, 57.255), stdev = 1.717
CI (99.9%): [47.854, 61.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: 5 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.SumBenchmark.sum
# Parameters: (size = 100000)
# Run progress: 66.67% complete, ETA 00:00:08
# Fork: 1 of 1
# Warmup Iteration 1: 8474.836 ns/op
# Warmup Iteration 2: 7431.944 ns/op
# Warmup Iteration 3: 7347.101 ns/op
Iteration 1: 7377.289 ns/op
Iteration 2: 7499.047 ns/op
Iteration 3: 7046.908 ns/op
Iteration 4: 7454.035 ns/op
Iteration 5: 7662.632 ns/op
Result "com.ankurm.jmhbasics.SumBenchmark.sum":
7407.982 ±(99.9%) 875.072 ns/op [Average]
(min, avg, max) = (7046.908, 7407.982, 7662.632), stdev = 227.254
CI (99.9%): [6532.910, 8283.055] (assumes normal distribution)
# Run complete. Total time: 00:00:25
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 (size) Mode Cnt Score Error Units
SumBenchmark.sum 10 avgt 5 10.721 ± 4.427 ns/op
SumBenchmark.sum 1000 avgt 5 54.465 ± 6.611 ns/op
SumBenchmark.sum 100000 avgt 5 7407.982 ± 875.072 ns/op