# JMH version: 1.33 # VM version: JDK 11.0.2, OpenJDK 64-Bit Server VM, 11.0.2+9 # VM invoker: C:\Program Files\Java\jdk-11.0.2\bin\java.exe # VM options: -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.1\lib\idea_rt.jar=62315:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.1\bin -Dfile.encoding=UTF-8 # Blackhole mode: full + dont-inline hint (default, use -Djmh.blackhole.autoDetect=true to auto-detect) # Warmup: 3 iterations, 1 s each # Measurement: 3 iterations, 5 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: org.example.JMHExample.addArrayList
Result "org.example.JMHExample.addArrayList": 281986.682 ±(99.9%) 28381.842 ns/op [Average] (min, avg, max) = (262447.982, 281986.682, 368421.391), stdev = 26548.393 CI (99.9%): [253604.840, 310368.524] (assumes normal distribution)
# JMH version: 1.33 # VM version: JDK 11.0.2, OpenJDK 64-Bit Server VM, 11.0.2+9 # VM invoker: C:\Program Files\Java\jdk-11.0.2\bin\java.exe # VM options: -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.1\lib\idea_rt.jar=62315:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.1\bin -Dfile.encoding=UTF-8 # Blackhole mode: full + dont-inline hint (default, use -Djmh.blackhole.autoDetect=true to auto-detect) # Warmup: 3 iterations, 1 s each # Measurement: 3 iterations, 5 s each # Timeout: 10 min per iteration # Threads: 1 thread, will synchronize iterations # Benchmark mode: Average time, time/op # Benchmark: org.example.JMHExample.addLinkedList
Result "org.example.JMHExample.addLinkedList": 266844.826 ±(99.9%) 4881.063 ns/op [Average] (min, avg, max) = (258488.261, 266844.826, 274087.549), stdev = 4565.749 CI (99.9%): [261963.764, 271725.889] (assumes normal distribution)
# Run complete. Total time: 00:03:08
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 onJVM/OS/HWlevel, askforreviewsfromthedomainexperts. Do not assume the numbers tell you what you want them to tell.