parallel-streams: JMH benchmarks and demos for when parallel streams are slower
N x Q model, source splittability, boxing, ordered operations, common-pool starvation, and parallel-stream correctness bugs. Captured output in output/. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6hCTuFrQT8xKmmMrF
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
availableProcessors = 2 (default commonPool parallelism = 1)
|
||||
openjdk version "25.0.5" 2026-10-20 LTS
|
||||
OpenJDK Runtime Environment Temurin-25.0.5+8 (build 25.0.5+8-LTS)
|
||||
OpenJDK 64-Bit Server VM Temurin-25.0.5+8 (build 25.0.5+8-LTS, mixed mode, sharing)
|
||||
@@ -0,0 +1,15 @@
|
||||
1. forEach(list::add), n = 100000, ten runs (-1 = exception):
|
||||
sizes: 90126 86309 22551 86194 -1 22732 87868 10443 15012 77596
|
||||
collect(toList()) size: 100000
|
||||
|
||||
2. reduce(10, Integer::sum) over 1..100
|
||||
sequential: 5060
|
||||
parallel : 5210
|
||||
|
||||
3. reduce(0, (a, b) -> a - b) over 1..1000
|
||||
sequential: -500500
|
||||
parallel : 0
|
||||
|
||||
4. counter[0]++ in forEach, n = 100000
|
||||
racy : 99997
|
||||
atomic : 100000
|
||||
@@ -0,0 +1,15 @@
|
||||
availableProcessors = 2
|
||||
commonPool parallelism = 3
|
||||
|
||||
1. Victim alone
|
||||
victim took 201 ms
|
||||
|
||||
2. Victim while a neighbour BLOCKS the common pool (8 tasks x 2000 ms)
|
||||
victim took 803 ms
|
||||
|
||||
3. Same neighbour, but it runs in its OWN ForkJoinPool(3)
|
||||
victim took 200 ms
|
||||
|
||||
4. 20 blocking tasks x 200 ms: parallel stream vs virtual threads
|
||||
parallel stream : 1002 ms
|
||||
virtual threads : 216 ms
|
||||
@@ -0,0 +1,399 @@
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 100, q = 1)
|
||||
|
||||
# Run progress: 0.00% complete, ETA 00:01:36
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 2.554 us/op
|
||||
# Warmup Iteration 2: 2.826 us/op
|
||||
# Warmup Iteration 3: 3.246 us/op
|
||||
Iteration 1: 3.302 us/op
|
||||
Iteration 2: 3.168 us/op
|
||||
Iteration 3: 3.191 us/op
|
||||
Iteration 4: 3.197 us/op
|
||||
Iteration 5: 3.276 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
3.227 ±(99.9%) 0.227 us/op [Average]
|
||||
(min, avg, max) = (3.168, 3.227, 3.302), stdev = 0.059
|
||||
CI (99.9%): [3.000, 3.453] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 100, q = 100)
|
||||
|
||||
# Run progress: 8.33% complete, ETA 00:01:30
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 17.115 us/op
|
||||
# Warmup Iteration 2: 19.112 us/op
|
||||
# Warmup Iteration 3: 17.243 us/op
|
||||
Iteration 1: 17.042 us/op
|
||||
Iteration 2: 18.133 us/op
|
||||
Iteration 3: 18.558 us/op
|
||||
Iteration 4: 16.680 us/op
|
||||
Iteration 5: 14.709 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
17.024 ±(99.9%) 5.796 us/op [Average]
|
||||
(min, avg, max) = (14.709, 17.024, 18.558), stdev = 1.505
|
||||
CI (99.9%): [11.228, 22.821] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 10000, q = 1)
|
||||
|
||||
# Run progress: 16.67% complete, ETA 00:01:22
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 41.559 us/op
|
||||
# Warmup Iteration 2: 41.886 us/op
|
||||
# Warmup Iteration 3: 40.756 us/op
|
||||
Iteration 1: 45.860 us/op
|
||||
Iteration 2: 45.214 us/op
|
||||
Iteration 3: 45.519 us/op
|
||||
Iteration 4: 45.168 us/op
|
||||
Iteration 5: 44.723 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
45.297 ±(99.9%) 1.633 us/op [Average]
|
||||
(min, avg, max) = (44.723, 45.297, 45.860), stdev = 0.424
|
||||
CI (99.9%): [43.664, 46.929] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 10000, q = 100)
|
||||
|
||||
# Run progress: 25.00% complete, ETA 00:01:14
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 818.776 us/op
|
||||
# Warmup Iteration 2: 723.115 us/op
|
||||
# Warmup Iteration 3: 683.672 us/op
|
||||
Iteration 1: 695.548 us/op
|
||||
Iteration 2: 677.217 us/op
|
||||
Iteration 3: 702.129 us/op
|
||||
Iteration 4: 691.356 us/op
|
||||
Iteration 5: 678.731 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
688.996 ±(99.9%) 41.521 us/op [Average]
|
||||
(min, avg, max) = (677.217, 688.996, 702.129), stdev = 10.783
|
||||
CI (99.9%): [647.475, 730.518] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 1000000, q = 1)
|
||||
|
||||
# Run progress: 33.33% complete, ETA 00:01:06
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 2051.571 us/op
|
||||
# Warmup Iteration 2: 1906.834 us/op
|
||||
# Warmup Iteration 3: 2024.894 us/op
|
||||
Iteration 1: 1801.248 us/op
|
||||
Iteration 2: 1801.422 us/op
|
||||
Iteration 3: 1950.267 us/op
|
||||
Iteration 4: 2295.446 us/op
|
||||
Iteration 5: 1913.766 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
1952.430 ±(99.9%) 781.640 us/op [Average]
|
||||
(min, avg, max) = (1801.248, 1952.430, 2295.446), stdev = 202.989
|
||||
CI (99.9%): [1170.790, 2734.070] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.parallel
|
||||
# Parameters: (n = 1000000, q = 100)
|
||||
|
||||
# Run progress: 41.67% complete, ETA 00:00:57
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 67554.950 us/op
|
||||
# Warmup Iteration 2: 63880.972 us/op
|
||||
# Warmup Iteration 3: 67555.514 us/op
|
||||
Iteration 1: 66500.964 us/op
|
||||
Iteration 2: 66413.244 us/op
|
||||
Iteration 3: 65635.051 us/op
|
||||
Iteration 4: 68084.734 us/op
|
||||
Iteration 5: 64267.643 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.parallel":
|
||||
66180.327 ±(99.9%) 5356.241 us/op [Average]
|
||||
(min, avg, max) = (64267.643, 66180.327, 68084.734), stdev = 1390.999
|
||||
CI (99.9%): [60824.086, 71536.569] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 100, q = 1)
|
||||
|
||||
# Run progress: 50.00% complete, ETA 00:00:49
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 0.385 us/op
|
||||
# Warmup Iteration 2: 0.359 us/op
|
||||
# Warmup Iteration 3: 0.337 us/op
|
||||
Iteration 1: 0.338 us/op
|
||||
Iteration 2: 0.343 us/op
|
||||
Iteration 3: 0.352 us/op
|
||||
Iteration 4: 0.346 us/op
|
||||
Iteration 5: 0.344 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
0.345 ±(99.9%) 0.020 us/op [Average]
|
||||
(min, avg, max) = (0.338, 0.345, 0.352), stdev = 0.005
|
||||
CI (99.9%): [0.324, 0.365] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 100, q = 100)
|
||||
|
||||
# Run progress: 58.33% complete, ETA 00:00:41
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 13.752 us/op
|
||||
# Warmup Iteration 2: 13.339 us/op
|
||||
# Warmup Iteration 3: 13.433 us/op
|
||||
Iteration 1: 13.190 us/op
|
||||
Iteration 2: 12.791 us/op
|
||||
Iteration 3: 12.906 us/op
|
||||
Iteration 4: 12.862 us/op
|
||||
Iteration 5: 13.182 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
12.986 ±(99.9%) 0.719 us/op [Average]
|
||||
(min, avg, max) = (12.791, 12.986, 13.190), stdev = 0.187
|
||||
CI (99.9%): [12.267, 13.705] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 10000, q = 1)
|
||||
|
||||
# Run progress: 66.67% complete, ETA 00:00:33
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 33.847 us/op
|
||||
# Warmup Iteration 2: 34.601 us/op
|
||||
# Warmup Iteration 3: 32.702 us/op
|
||||
Iteration 1: 31.444 us/op
|
||||
Iteration 2: 31.912 us/op
|
||||
Iteration 3: 31.441 us/op
|
||||
Iteration 4: 36.858 us/op
|
||||
Iteration 5: 33.124 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
32.956 ±(99.9%) 8.808 us/op [Average]
|
||||
(min, avg, max) = (31.441, 32.956, 36.858), stdev = 2.287
|
||||
CI (99.9%): [24.147, 41.764] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 10000, q = 100)
|
||||
|
||||
# Run progress: 75.00% complete, ETA 00:00:24
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1323.332 us/op
|
||||
# Warmup Iteration 2: 1291.482 us/op
|
||||
# Warmup Iteration 3: 1267.897 us/op
|
||||
Iteration 1: 1298.120 us/op
|
||||
Iteration 2: 1318.923 us/op
|
||||
Iteration 3: 1306.951 us/op
|
||||
Iteration 4: 1287.234 us/op
|
||||
Iteration 5: 1314.010 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
1305.048 ±(99.9%) 48.775 us/op [Average]
|
||||
(min, avg, max) = (1287.234, 1305.048, 1318.923), stdev = 12.667
|
||||
CI (99.9%): [1256.273, 1353.823] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 1000000, q = 1)
|
||||
|
||||
# Run progress: 83.33% complete, ETA 00:00:16
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 3185.234 us/op
|
||||
# Warmup Iteration 2: 3270.377 us/op
|
||||
# Warmup Iteration 3: 3403.997 us/op
|
||||
Iteration 1: 3126.314 us/op
|
||||
Iteration 2: 3046.140 us/op
|
||||
Iteration 3: 3579.626 us/op
|
||||
Iteration 4: 3076.687 us/op
|
||||
Iteration 5: 3034.810 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
3172.715 ±(99.9%) 886.464 us/op [Average]
|
||||
(min, avg, max) = (3034.810, 3172.715, 3579.626), stdev = 230.212
|
||||
CI (99.9%): [2286.252, 4059.179] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.NqBenchmark.sequential
|
||||
# Parameters: (n = 1000000, q = 100)
|
||||
|
||||
# Run progress: 91.67% complete, ETA 00:00:08
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 125134.566 us/op
|
||||
# Warmup Iteration 2: 121151.145 us/op
|
||||
# Warmup Iteration 3: 126327.662 us/op
|
||||
Iteration 1: 127210.986 us/op
|
||||
Iteration 2: 127633.563 us/op
|
||||
Iteration 3: 126364.109 us/op
|
||||
Iteration 4: 131880.637 us/op
|
||||
Iteration 5: 124313.179 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.NqBenchmark.sequential":
|
||||
127480.495 ±(99.9%) 10673.912 us/op [Average]
|
||||
(min, avg, max) = (124313.179, 127480.495, 131880.637), stdev = 2771.981
|
||||
CI (99.9%): [116806.582, 138154.407] (assumes normal distribution)
|
||||
|
||||
|
||||
# Run complete. Total time: 00:01:39
|
||||
|
||||
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 (n) (q) Mode Cnt Score Error Units
|
||||
NqBenchmark.parallel 100 1 avgt 5 3.227 ± 0.227 us/op
|
||||
NqBenchmark.parallel 100 100 avgt 5 17.024 ± 5.796 us/op
|
||||
NqBenchmark.parallel 10000 1 avgt 5 45.297 ± 1.633 us/op
|
||||
NqBenchmark.parallel 10000 100 avgt 5 688.996 ± 41.521 us/op
|
||||
NqBenchmark.parallel 1000000 1 avgt 5 1952.430 ± 781.640 us/op
|
||||
NqBenchmark.parallel 1000000 100 avgt 5 66180.327 ± 5356.241 us/op
|
||||
NqBenchmark.sequential 100 1 avgt 5 0.345 ± 0.020 us/op
|
||||
NqBenchmark.sequential 100 100 avgt 5 12.986 ± 0.719 us/op
|
||||
NqBenchmark.sequential 10000 1 avgt 5 32.956 ± 8.808 us/op
|
||||
NqBenchmark.sequential 10000 100 avgt 5 1305.048 ± 48.775 us/op
|
||||
NqBenchmark.sequential 1000000 1 avgt 5 3172.715 ± 886.464 us/op
|
||||
NqBenchmark.sequential 1000000 100 avgt 5 127480.495 ± 10673.912 us/op
|
||||
@@ -0,0 +1,263 @@
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.arrayList_par
|
||||
|
||||
# Run progress: 0.00% complete, ETA 00:01:04
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 875.141 us/op
|
||||
# Warmup Iteration 2: 1000.046 us/op
|
||||
# Warmup Iteration 3: 887.776 us/op
|
||||
Iteration 1: 892.010 us/op
|
||||
Iteration 2: 897.553 us/op
|
||||
Iteration 3: 799.533 us/op
|
||||
Iteration 4: 810.756 us/op
|
||||
Iteration 5: 923.902 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.arrayList_par":
|
||||
864.751 ±(99.9%) 215.142 us/op [Average]
|
||||
(min, avg, max) = (799.533, 864.751, 923.902), stdev = 55.872
|
||||
CI (99.9%): [649.608, 1079.893] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.arrayList_seq
|
||||
|
||||
# Run progress: 12.50% complete, ETA 00:00:57
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1707.637 us/op
|
||||
# Warmup Iteration 2: 1671.232 us/op
|
||||
# Warmup Iteration 3: 1639.488 us/op
|
||||
Iteration 1: 1646.433 us/op
|
||||
Iteration 2: 1587.087 us/op
|
||||
Iteration 3: 1617.898 us/op
|
||||
Iteration 4: 1563.128 us/op
|
||||
Iteration 5: 1565.962 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.arrayList_seq":
|
||||
1596.102 ±(99.9%) 137.297 us/op [Average]
|
||||
(min, avg, max) = (1563.128, 1596.102, 1646.433), stdev = 35.656
|
||||
CI (99.9%): [1458.805, 1733.399] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.intArray_par
|
||||
|
||||
# Run progress: 25.00% complete, ETA 00:00:49
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 844.636 us/op
|
||||
# Warmup Iteration 2: 812.772 us/op
|
||||
# Warmup Iteration 3: 799.070 us/op
|
||||
Iteration 1: 934.718 us/op
|
||||
Iteration 2: 807.934 us/op
|
||||
Iteration 3: 833.626 us/op
|
||||
Iteration 4: 805.721 us/op
|
||||
Iteration 5: 808.579 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.intArray_par":
|
||||
838.116 ±(99.9%) 212.527 us/op [Average]
|
||||
(min, avg, max) = (805.721, 838.116, 934.718), stdev = 55.192
|
||||
CI (99.9%): [625.589, 1050.642] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.intArray_seq
|
||||
|
||||
# Run progress: 37.50% complete, ETA 00:00:41
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1557.406 us/op
|
||||
# Warmup Iteration 2: 1627.566 us/op
|
||||
# Warmup Iteration 3: 1530.733 us/op
|
||||
Iteration 1: 1672.832 us/op
|
||||
Iteration 2: 1485.387 us/op
|
||||
Iteration 3: 1511.766 us/op
|
||||
Iteration 4: 1480.313 us/op
|
||||
Iteration 5: 1506.690 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.intArray_seq":
|
||||
1531.397 ±(99.9%) 308.809 us/op [Average]
|
||||
(min, avg, max) = (1480.313, 1531.397, 1672.832), stdev = 80.197
|
||||
CI (99.9%): [1222.588, 1840.206] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.iterate_par
|
||||
|
||||
# Run progress: 50.00% complete, ETA 00:00:32
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 3539.271 us/op
|
||||
# Warmup Iteration 2: 3281.146 us/op
|
||||
# Warmup Iteration 3: 2699.139 us/op
|
||||
Iteration 1: 2826.627 us/op
|
||||
Iteration 2: 2769.716 us/op
|
||||
Iteration 3: 2790.944 us/op
|
||||
Iteration 4: 2817.520 us/op
|
||||
Iteration 5: 2756.321 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.iterate_par":
|
||||
2792.226 ±(99.9%) 115.852 us/op [Average]
|
||||
(min, avg, max) = (2756.321, 2792.226, 2826.627), stdev = 30.086
|
||||
CI (99.9%): [2676.374, 2908.078] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.iterate_seq
|
||||
|
||||
# Run progress: 62.50% complete, ETA 00:00:24
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 2122.584 us/op
|
||||
# Warmup Iteration 2: 2051.970 us/op
|
||||
# Warmup Iteration 3: 1984.262 us/op
|
||||
Iteration 1: 1958.438 us/op
|
||||
Iteration 2: 1903.397 us/op
|
||||
Iteration 3: 1902.650 us/op
|
||||
Iteration 4: 2086.336 us/op
|
||||
Iteration 5: 1962.841 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.iterate_seq":
|
||||
1962.732 ±(99.9%) 288.329 us/op [Average]
|
||||
(min, avg, max) = (1902.650, 1962.732, 2086.336), stdev = 74.878
|
||||
CI (99.9%): [1674.404, 2251.061] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.linkedList_par
|
||||
|
||||
# Run progress: 75.00% complete, ETA 00:00:16
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1723.307 us/op
|
||||
# Warmup Iteration 2: 1523.676 us/op
|
||||
# Warmup Iteration 3: 1797.511 us/op
|
||||
Iteration 1: 1736.234 us/op
|
||||
Iteration 2: 1713.686 us/op
|
||||
Iteration 3: 1867.840 us/op
|
||||
Iteration 4: 1627.651 us/op
|
||||
Iteration 5: 1840.748 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.linkedList_par":
|
||||
1757.232 ±(99.9%) 376.977 us/op [Average]
|
||||
(min, avg, max) = (1627.651, 1757.232, 1867.840), stdev = 97.900
|
||||
CI (99.9%): [1380.255, 2134.208] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.SourceBenchmark.linkedList_seq
|
||||
|
||||
# Run progress: 87.50% complete, ETA 00:00:08
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1624.775 us/op
|
||||
# Warmup Iteration 2: 1606.300 us/op
|
||||
# Warmup Iteration 3: 1722.162 us/op
|
||||
Iteration 1: 1703.266 us/op
|
||||
Iteration 2: 1687.384 us/op
|
||||
Iteration 3: 1581.179 us/op
|
||||
Iteration 4: 1695.401 us/op
|
||||
Iteration 5: 1660.109 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.SourceBenchmark.linkedList_seq":
|
||||
1665.468 ±(99.9%) 191.938 us/op [Average]
|
||||
(min, avg, max) = (1581.179, 1665.468, 1703.266), stdev = 49.846
|
||||
CI (99.9%): [1473.530, 1857.405] (assumes normal distribution)
|
||||
|
||||
|
||||
# Run complete. Total time: 00:01:05
|
||||
|
||||
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
|
||||
SourceBenchmark.arrayList_par avgt 5 864.751 ± 215.142 us/op
|
||||
SourceBenchmark.arrayList_seq avgt 5 1596.102 ± 137.297 us/op
|
||||
SourceBenchmark.intArray_par avgt 5 838.116 ± 212.527 us/op
|
||||
SourceBenchmark.intArray_seq avgt 5 1531.397 ± 308.809 us/op
|
||||
SourceBenchmark.iterate_par avgt 5 2792.226 ± 115.852 us/op
|
||||
SourceBenchmark.iterate_seq avgt 5 1962.732 ± 288.329 us/op
|
||||
SourceBenchmark.linkedList_par avgt 5 1757.232 ± 376.977 us/op
|
||||
SourceBenchmark.linkedList_seq avgt 5 1665.468 ± 191.938 us/op
|
||||
@@ -0,0 +1,283 @@
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.BoxingBenchmark.boxed_par
|
||||
|
||||
# Run progress: 0.00% complete, ETA 00:00:32
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 974.986 us/op
|
||||
# Warmup Iteration 2: 848.792 us/op
|
||||
# Warmup Iteration 3: 796.211 us/op
|
||||
Iteration 1: 870.351 us/op
|
||||
gc.alloc.rate: 1.213 MB/sec
|
||||
gc.alloc.rate.norm: 1107.770 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 2: 824.111 us/op
|
||||
gc.alloc.rate: 1.281 MB/sec
|
||||
gc.alloc.rate.norm: 1108.642 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 3: 845.852 us/op
|
||||
gc.alloc.rate: 1.243 MB/sec
|
||||
gc.alloc.rate.norm: 1107.741 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 4: 861.177 us/op
|
||||
gc.alloc.rate: 1.227 MB/sec
|
||||
gc.alloc.rate.norm: 1109.962 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 5: 886.850 us/op
|
||||
gc.alloc.rate: 1.190 MB/sec
|
||||
gc.alloc.rate.norm: 1106.539 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_par":
|
||||
857.668 ±(99.9%) 92.144 us/op [Average]
|
||||
(min, avg, max) = (824.111, 857.668, 886.850), stdev = 23.930
|
||||
CI (99.9%): [765.524, 949.812] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_par:gc.alloc.rate":
|
||||
1.231 ±(99.9%) 0.132 MB/sec [Average]
|
||||
(min, avg, max) = (1.190, 1.231, 1.281), stdev = 0.034
|
||||
CI (99.9%): [1.099, 1.362] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_par:gc.alloc.rate.norm":
|
||||
1108.131 ±(99.9%) 4.882 B/op [Average]
|
||||
(min, avg, max) = (1106.539, 1108.131, 1109.962), stdev = 1.268
|
||||
CI (99.9%): [1103.249, 1113.013] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_par:gc.count":
|
||||
≈ 0 counts
|
||||
|
||||
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.BoxingBenchmark.boxed_seq
|
||||
|
||||
# Run progress: 25.00% complete, ETA 00:00:24
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 1431.858 us/op
|
||||
# Warmup Iteration 2: 1497.100 us/op
|
||||
# Warmup Iteration 3: 1432.571 us/op
|
||||
Iteration 1: 1389.004 us/op
|
||||
gc.alloc.rate: 0.232 MB/sec
|
||||
gc.alloc.rate.norm: 337.709 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 2: 1421.737 us/op
|
||||
gc.alloc.rate: 0.227 MB/sec
|
||||
gc.alloc.rate.norm: 337.943 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 3: 1439.071 us/op
|
||||
gc.alloc.rate: 0.224 MB/sec
|
||||
gc.alloc.rate.norm: 338.029 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 4: 1446.336 us/op
|
||||
gc.alloc.rate: 0.223 MB/sec
|
||||
gc.alloc.rate.norm: 338.116 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 5: 1482.209 us/op
|
||||
gc.alloc.rate: 0.218 MB/sec
|
||||
gc.alloc.rate.norm: 338.584 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_seq":
|
||||
1435.671 ±(99.9%) 131.474 us/op [Average]
|
||||
(min, avg, max) = (1389.004, 1435.671, 1482.209), stdev = 34.143
|
||||
CI (99.9%): [1304.197, 1567.146] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_seq:gc.alloc.rate":
|
||||
0.224 ±(99.9%) 0.020 MB/sec [Average]
|
||||
(min, avg, max) = (0.218, 0.224, 0.232), stdev = 0.005
|
||||
CI (99.9%): [0.205, 0.244] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_seq:gc.alloc.rate.norm":
|
||||
338.076 ±(99.9%) 1.239 B/op [Average]
|
||||
(min, avg, max) = (337.709, 338.076, 338.584), stdev = 0.322
|
||||
CI (99.9%): [336.837, 339.315] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.boxed_seq:gc.count":
|
||||
≈ 0 counts
|
||||
|
||||
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.BoxingBenchmark.primitive_par
|
||||
|
||||
# Run progress: 50.00% complete, ETA 00:00:16
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 205.937 us/op
|
||||
# Warmup Iteration 2: 170.623 us/op
|
||||
# Warmup Iteration 3: 162.141 us/op
|
||||
Iteration 1: 161.161 us/op
|
||||
gc.alloc.rate: 5.462 MB/sec
|
||||
gc.alloc.rate.norm: 923.506 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 2: 164.425 us/op
|
||||
gc.alloc.rate: 5.369 MB/sec
|
||||
gc.alloc.rate.norm: 925.919 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 3: 166.830 us/op
|
||||
gc.alloc.rate: 5.271 MB/sec
|
||||
gc.alloc.rate.norm: 922.734 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 4: 155.618 us/op
|
||||
gc.alloc.rate: 5.651 MB/sec
|
||||
gc.alloc.rate.norm: 922.257 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 5: 153.176 us/op
|
||||
gc.alloc.rate: 5.726 MB/sec
|
||||
gc.alloc.rate.norm: 919.993 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_par":
|
||||
160.242 ±(99.9%) 22.209 us/op [Average]
|
||||
(min, avg, max) = (153.176, 160.242, 166.830), stdev = 5.768
|
||||
CI (99.9%): [138.033, 182.451] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_par:gc.alloc.rate":
|
||||
5.496 ±(99.9%) 0.733 MB/sec [Average]
|
||||
(min, avg, max) = (5.271, 5.496, 5.726), stdev = 0.190
|
||||
CI (99.9%): [4.763, 6.229] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_par:gc.alloc.rate.norm":
|
||||
922.882 ±(99.9%) 8.253 B/op [Average]
|
||||
(min, avg, max) = (919.993, 922.882, 925.919), stdev = 2.143
|
||||
CI (99.9%): [914.629, 931.135] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_par:gc.count":
|
||||
≈ 0 counts
|
||||
|
||||
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.BoxingBenchmark.primitive_seq
|
||||
|
||||
# Run progress: 75.00% complete, ETA 00:00:08
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 273.688 us/op
|
||||
# Warmup Iteration 2: 265.275 us/op
|
||||
# Warmup Iteration 3: 264.934 us/op
|
||||
Iteration 1: 274.675 us/op
|
||||
gc.alloc.rate: 0.645 MB/sec
|
||||
gc.alloc.rate.norm: 185.921 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 2: 271.925 us/op
|
||||
gc.alloc.rate: 0.651 MB/sec
|
||||
gc.alloc.rate.norm: 185.902 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 3: 269.727 us/op
|
||||
gc.alloc.rate: 0.655 MB/sec
|
||||
gc.alloc.rate.norm: 185.887 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 4: 266.509 us/op
|
||||
gc.alloc.rate: 0.665 MB/sec
|
||||
gc.alloc.rate.norm: 185.865 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
Iteration 5: 265.184 us/op
|
||||
gc.alloc.rate: 0.668 MB/sec
|
||||
gc.alloc.rate.norm: 185.847 B/op
|
||||
gc.count: ≈ 0 counts
|
||||
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_seq":
|
||||
269.604 ±(99.9%) 14.943 us/op [Average]
|
||||
(min, avg, max) = (265.184, 269.604, 274.675), stdev = 3.881
|
||||
CI (99.9%): [254.660, 284.547] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_seq:gc.alloc.rate":
|
||||
0.657 ±(99.9%) 0.036 MB/sec [Average]
|
||||
(min, avg, max) = (0.645, 0.657, 0.668), stdev = 0.009
|
||||
CI (99.9%): [0.621, 0.693] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_seq:gc.alloc.rate.norm":
|
||||
185.884 ±(99.9%) 0.113 B/op [Average]
|
||||
(min, avg, max) = (185.847, 185.884, 185.921), stdev = 0.029
|
||||
CI (99.9%): [185.771, 185.997] (assumes normal distribution)
|
||||
|
||||
Secondary result "com.ankurm.parallelstreams.BoxingBenchmark.primitive_seq:gc.count":
|
||||
≈ 0 counts
|
||||
|
||||
|
||||
# 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
|
||||
BoxingBenchmark.boxed_par avgt 5 857.668 ± 92.144 us/op
|
||||
BoxingBenchmark.boxed_par:gc.alloc.rate avgt 5 1.231 ± 0.132 MB/sec
|
||||
BoxingBenchmark.boxed_par:gc.alloc.rate.norm avgt 5 1108.131 ± 4.882 B/op
|
||||
BoxingBenchmark.boxed_par:gc.count avgt 5 ≈ 0 counts
|
||||
BoxingBenchmark.boxed_seq avgt 5 1435.671 ± 131.474 us/op
|
||||
BoxingBenchmark.boxed_seq:gc.alloc.rate avgt 5 0.224 ± 0.020 MB/sec
|
||||
BoxingBenchmark.boxed_seq:gc.alloc.rate.norm avgt 5 338.076 ± 1.239 B/op
|
||||
BoxingBenchmark.boxed_seq:gc.count avgt 5 ≈ 0 counts
|
||||
BoxingBenchmark.primitive_par avgt 5 160.242 ± 22.209 us/op
|
||||
BoxingBenchmark.primitive_par:gc.alloc.rate avgt 5 5.496 ± 0.733 MB/sec
|
||||
BoxingBenchmark.primitive_par:gc.alloc.rate.norm avgt 5 922.882 ± 8.253 B/op
|
||||
BoxingBenchmark.primitive_par:gc.count avgt 5 ≈ 0 counts
|
||||
BoxingBenchmark.primitive_seq avgt 5 269.604 ± 14.943 us/op
|
||||
BoxingBenchmark.primitive_seq:gc.alloc.rate avgt 5 0.657 ± 0.036 MB/sec
|
||||
BoxingBenchmark.primitive_seq:gc.alloc.rate.norm avgt 5 185.884 ± 0.113 B/op
|
||||
BoxingBenchmark.primitive_seq:gc.count avgt 5 ≈ 0 counts
|
||||
@@ -0,0 +1,201 @@
|
||||
# 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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.distinct_par_ordered
|
||||
|
||||
# Run progress: 0.00% complete, ETA 00:00:48
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 8704.466 us/op
|
||||
# Warmup Iteration 2: 9269.009 us/op
|
||||
# Warmup Iteration 3: 9734.713 us/op
|
||||
Iteration 1: 9733.449 us/op
|
||||
Iteration 2: 9639.780 us/op
|
||||
Iteration 3: 8957.786 us/op
|
||||
Iteration 4: 11247.905 us/op
|
||||
Iteration 5: 9896.392 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.distinct_par_ordered":
|
||||
9895.062 ±(99.9%) 3221.657 us/op [Average]
|
||||
(min, avg, max) = (8957.786, 9895.062, 11247.905), stdev = 836.654
|
||||
CI (99.9%): [6673.405, 13116.719] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.distinct_par_unordered
|
||||
|
||||
# Run progress: 16.67% complete, ETA 00:00:41
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 13742.908 us/op
|
||||
# Warmup Iteration 2: 7226.162 us/op
|
||||
# Warmup Iteration 3: 5339.945 us/op
|
||||
Iteration 1: 6457.032 us/op
|
||||
Iteration 2: 7957.638 us/op
|
||||
Iteration 3: 5756.201 us/op
|
||||
Iteration 4: 6078.999 us/op
|
||||
Iteration 5: 5919.050 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.distinct_par_unordered":
|
||||
6433.784 ±(99.9%) 3429.350 us/op [Average]
|
||||
(min, avg, max) = (5756.201, 6433.784, 7957.638), stdev = 890.591
|
||||
CI (99.9%): [3004.434, 9863.134] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.distinct_seq
|
||||
|
||||
# Run progress: 33.33% complete, ETA 00:00:33
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 4882.585 us/op
|
||||
# Warmup Iteration 2: 4988.734 us/op
|
||||
# Warmup Iteration 3: 4556.600 us/op
|
||||
Iteration 1: 5324.242 us/op
|
||||
Iteration 2: 5486.219 us/op
|
||||
Iteration 3: 4496.437 us/op
|
||||
Iteration 4: 4425.314 us/op
|
||||
Iteration 5: 4358.564 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.distinct_seq":
|
||||
4818.155 ±(99.9%) 2083.875 us/op [Average]
|
||||
(min, avg, max) = (4358.564, 4818.155, 5486.219), stdev = 541.176
|
||||
CI (99.9%): [2734.281, 6902.030] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.limit_par_ordered
|
||||
|
||||
# Run progress: 50.00% complete, ETA 00:00:24
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 258.706 us/op
|
||||
# Warmup Iteration 2: 228.867 us/op
|
||||
# Warmup Iteration 3: 218.050 us/op
|
||||
Iteration 1: 212.607 us/op
|
||||
Iteration 2: 215.389 us/op
|
||||
Iteration 3: 226.594 us/op
|
||||
Iteration 4: 210.350 us/op
|
||||
Iteration 5: 210.371 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.limit_par_ordered":
|
||||
215.062 ±(99.9%) 26.069 us/op [Average]
|
||||
(min, avg, max) = (210.350, 215.062, 226.594), stdev = 6.770
|
||||
CI (99.9%): [188.993, 241.131] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.limit_par_unordered
|
||||
|
||||
# Run progress: 66.67% complete, ETA 00:00:16
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 80.165 us/op
|
||||
# Warmup Iteration 2: 57.729 us/op
|
||||
# Warmup Iteration 3: 57.777 us/op
|
||||
Iteration 1: 55.429 us/op
|
||||
Iteration 2: 54.038 us/op
|
||||
Iteration 3: 59.503 us/op
|
||||
Iteration 4: 57.574 us/op
|
||||
Iteration 5: 56.395 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.limit_par_unordered":
|
||||
56.588 ±(99.9%) 8.020 us/op [Average]
|
||||
(min, avg, max) = (54.038, 56.588, 59.503), stdev = 2.083
|
||||
CI (99.9%): [48.568, 64.608] (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
|
||||
# VM options: -Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts -Djavax.net.ssl.trustStoreType=JKS -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=42575 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|api.anthropic.com|api-staging.anthropic.com|api-pr-preview.anthropic.com|mcp-proxy.anthropic.com|mcp-proxy-staging.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
|
||||
# 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.parallelstreams.OrderedOpsBenchmark.limit_seq
|
||||
|
||||
# Run progress: 83.33% complete, ETA 00:00:08
|
||||
# Fork: 1 of 1
|
||||
# Warmup Iteration 1: 63.583 us/op
|
||||
# Warmup Iteration 2: 68.744 us/op
|
||||
# Warmup Iteration 3: 61.862 us/op
|
||||
Iteration 1: 60.503 us/op
|
||||
Iteration 2: 37.577 us/op
|
||||
Iteration 3: 38.935 us/op
|
||||
Iteration 4: 37.643 us/op
|
||||
Iteration 5: 36.974 us/op
|
||||
|
||||
|
||||
Result "com.ankurm.parallelstreams.OrderedOpsBenchmark.limit_seq":
|
||||
42.326 ±(99.9%) 39.223 us/op [Average]
|
||||
(min, avg, max) = (36.974, 42.326, 60.503), stdev = 10.186
|
||||
CI (99.9%): [3.103, 81.549] (assumes normal distribution)
|
||||
|
||||
|
||||
# Run complete. Total time: 00:00:49
|
||||
|
||||
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
|
||||
OrderedOpsBenchmark.distinct_par_ordered avgt 5 9895.062 ± 3221.657 us/op
|
||||
OrderedOpsBenchmark.distinct_par_unordered avgt 5 6433.784 ± 3429.350 us/op
|
||||
OrderedOpsBenchmark.distinct_seq avgt 5 4818.155 ± 2083.875 us/op
|
||||
OrderedOpsBenchmark.limit_par_ordered avgt 5 215.062 ± 26.069 us/op
|
||||
OrderedOpsBenchmark.limit_par_unordered avgt 5 56.588 ± 8.020 us/op
|
||||
OrderedOpsBenchmark.limit_seq avgt 5 42.326 ± 39.223 us/op
|
||||
@@ -0,0 +1,4 @@
|
||||
[INFO] Running com.ankurm.parallelstreams.ParallelStreamsTest
|
||||
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.115 s -- in com.ankurm.parallelstreams.ParallelStreamsTest
|
||||
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
|
||||
[INFO] BUILD SUCCESS
|
||||
Reference in New Issue
Block a user