Created
February 2, 2024 07:02
-
-
Save xuwei-k/e481d19c0835621f1ed74c4405d6bcbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] running (fork) org.openjdk.jmh.Main -i 10 -wi 10 -f1 | |
[info] # JMH version: 1.37 | |
[info] # VM version: JDK 23-ea, OpenJDK 64-Bit Server VM, 23-ea+7-481 | |
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home/bin/java | |
[info] # VM options: <none> | |
[info] # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) | |
[info] # Warmup: 10 iterations, 10 s each | |
[info] # Measurement: 10 iterations, 10 s each | |
[info] # Timeout: 10 min per iteration | |
[info] # Threads: 1 thread, will synchronize iterations | |
[info] # Benchmark mode: Throughput, ops/time | |
[info] # Benchmark: p1.Bench.javaIfElse | |
[info] # Run progress: 0.00% complete, ETA 00:10:00 | |
[info] # Fork: 1 of 1 | |
[info] # Warmup Iteration 1: 35167.289 ops/s | |
[info] # Warmup Iteration 2: 36063.010 ops/s | |
[info] # Warmup Iteration 3: 35997.886 ops/s | |
[info] # Warmup Iteration 4: 35837.038 ops/s | |
[info] # Warmup Iteration 5: 35564.058 ops/s | |
[info] # Warmup Iteration 6: 35613.619 ops/s | |
[info] # Warmup Iteration 7: 35525.485 ops/s | |
[info] # Warmup Iteration 8: 35681.640 ops/s | |
[info] # Warmup Iteration 9: 35485.830 ops/s | |
[info] # Warmup Iteration 10: 35643.082 ops/s | |
[info] Iteration 1: 35769.730 ops/s | |
[info] Iteration 2: 35746.893 ops/s | |
[info] Iteration 3: 34203.675 ops/s | |
[info] Iteration 4: 35781.592 ops/s | |
[info] Iteration 5: 35867.521 ops/s | |
[info] Iteration 6: 35862.025 ops/s | |
[info] Iteration 7: 35761.548 ops/s | |
[info] Iteration 8: 35729.348 ops/s | |
[info] Iteration 9: 35910.344 ops/s | |
[info] Iteration 10: 35779.533 ops/s | |
[info] Result "p1.Bench.javaIfElse": | |
[info] 35641.221 ±(99.9%) 768.869 ops/s [Average] | |
[info] (min, avg, max) = (34203.675, 35641.221, 35910.344), stdev = 508.559 | |
[info] CI (99.9%): [34872.352, 36410.090] (assumes normal distribution) | |
[info] # JMH version: 1.37 | |
[info] # VM version: JDK 23-ea, OpenJDK 64-Bit Server VM, 23-ea+7-481 | |
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home/bin/java | |
[info] # VM options: <none> | |
[info] # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) | |
[info] # Warmup: 10 iterations, 10 s each | |
[info] # Measurement: 10 iterations, 10 s each | |
[info] # Timeout: 10 min per iteration | |
[info] # Threads: 1 thread, will synchronize iterations | |
[info] # Benchmark mode: Throughput, ops/time | |
[info] # Benchmark: p1.Bench.javaSwitch | |
[info] # Run progress: 33.33% complete, ETA 00:06:40 | |
[info] # Fork: 1 of 1 | |
[info] # Warmup Iteration 1: 23569.407 ops/s | |
[info] # Warmup Iteration 2: 23371.238 ops/s | |
[info] # Warmup Iteration 3: 24557.304 ops/s | |
[info] # Warmup Iteration 4: 24592.280 ops/s | |
[info] # Warmup Iteration 5: 23355.323 ops/s | |
[info] # Warmup Iteration 6: 24833.621 ops/s | |
[info] # Warmup Iteration 7: 24896.383 ops/s | |
[info] # Warmup Iteration 8: 24665.317 ops/s | |
[info] # Warmup Iteration 9: 24714.091 ops/s | |
[info] # Warmup Iteration 10: 24644.733 ops/s | |
[info] Iteration 1: 24716.642 ops/s | |
[info] Iteration 2: 24373.975 ops/s | |
[info] Iteration 3: 24376.911 ops/s | |
[info] Iteration 4: 24386.142 ops/s | |
[info] Iteration 5: 24053.471 ops/s | |
[info] Iteration 6: 24374.261 ops/s | |
[info] Iteration 7: 24399.400 ops/s | |
[info] Iteration 8: 20804.871 ops/s | |
[info] Iteration 9: 24349.442 ops/s | |
[info] Iteration 10: 24243.587 ops/s | |
[info] Result "p1.Bench.javaSwitch": | |
[info] 24007.870 ±(99.9%) 1719.115 ops/s [Average] | |
[info] (min, avg, max) = (20804.871, 24007.870, 24716.642), stdev = 1137.088 | |
[info] CI (99.9%): [22288.755, 25726.985] (assumes normal distribution) | |
[info] # JMH version: 1.37 | |
[info] # VM version: JDK 23-ea, OpenJDK 64-Bit Server VM, 23-ea+7-481 | |
[info] # VM invoker: /Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home/bin/java | |
[info] # VM options: <none> | |
[info] # Blackhole mode: compiler (auto-detected, use -Djmh.blackhole.autoDetect=false to disable) | |
[info] # Warmup: 10 iterations, 10 s each | |
[info] # Measurement: 10 iterations, 10 s each | |
[info] # Timeout: 10 min per iteration | |
[info] # Threads: 1 thread, will synchronize iterations | |
[info] # Benchmark mode: Throughput, ops/time | |
[info] # Benchmark: p1.Bench.scalaMatch | |
[info] # Run progress: 66.67% complete, ETA 00:03:20 | |
[info] # Fork: 1 of 1 | |
[info] # Warmup Iteration 1: 34605.633 ops/s | |
[info] # Warmup Iteration 2: 35362.180 ops/s | |
[info] # Warmup Iteration 3: 35148.794 ops/s | |
[info] # Warmup Iteration 4: 35286.121 ops/s | |
[info] # Warmup Iteration 5: 35355.577 ops/s | |
[info] # Warmup Iteration 6: 35241.832 ops/s | |
[info] # Warmup Iteration 7: 35121.121 ops/s | |
[info] # Warmup Iteration 8: 35287.664 ops/s | |
[info] # Warmup Iteration 9: 35196.098 ops/s | |
[info] # Warmup Iteration 10: 35419.518 ops/s | |
[info] Iteration 1: 35364.334 ops/s | |
[info] Iteration 2: 35370.067 ops/s | |
[info] Iteration 3: 35437.097 ops/s | |
[info] Iteration 4: 35285.201 ops/s | |
[info] Iteration 5: 35216.119 ops/s | |
[info] Iteration 6: 35227.016 ops/s | |
[info] Iteration 7: 35455.284 ops/s | |
[info] Iteration 8: 35176.834 ops/s | |
[info] Iteration 9: 35213.402 ops/s | |
[info] Iteration 10: 35187.760 ops/s | |
[info] Result "p1.Bench.scalaMatch": | |
[info] 35293.312 ±(99.9%) 158.851 ops/s [Average] | |
[info] (min, avg, max) = (35176.834, 35293.312, 35455.284), stdev = 105.070 | |
[info] CI (99.9%): [35134.460, 35452.163] (assumes normal distribution) | |
[info] # Run complete. Total time: 00:10:00 | |
[info] REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on | |
[info] why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial | |
[info] experiments, perform baseline and negative tests that provide experimental control, make sure | |
[info] the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts. | |
[info] Do not assume the numbers tell you what you want them to tell. | |
[info] NOTE: Current JVM experimentally supports Compiler Blackholes, and they are in use. Please exercise | |
[info] extra caution when trusting the results, look into the generated code to check the benchmark still | |
[info] works, and factor in a small probability of new VM bugs. Additionally, while comparisons between | |
[info] different JVMs are already problematic, the performance difference caused by different Blackhole | |
[info] modes can be very significant. Please make sure you use the consistent Blackhole mode for comparisons. | |
[info] Benchmark Mode Cnt Score Error Units | |
[info] Bench.javaIfElse thrpt 10 35641.221 ± 768.869 ops/s | |
[info] Bench.javaSwitch thrpt 10 24007.870 ± 1719.115 ops/s | |
[info] Bench.scalaMatch thrpt 10 35293.312 ± 158.851 ops/s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment