-
Notifications
You must be signed in to change notification settings - Fork 8
Benchmarks
Aaron Riekenberg edited this page Mar 2, 2024
·
102 revisions
- 15-inch Macbook Air M2, 2023 (my personal laptop)
-
rust-parallel
uses 8 parallel jobs by default on this machine - MacOS 14.2.1
- Run
echo
on 1000 strings1
to1000
- Benchmarks run using hyperfine testing tool
- Link to benchmark script
- rust-parallel is 1.29 times faster when the path cache is enabled (this is enabled by default)
- rust-parallel is 1.54 times faster than xargs with 8 processes. Note that this use of xargs does not prevent output interleaving.
- rust-parallel is 12.50 times faster than GNU parallel
$ rust-parallel -V
rust-parallel 1.16.1
$ parallel -V
GNU parallel 20240222
Benchmark 1: seq 1 1000 | rust-parallel echo
Time (mean ± σ): 156.6 ms ± 0.6 ms [User: 219.6 ms, System: 600.1 ms]
Range (min … max): 155.5 ms … 157.6 ms 19 runs
Benchmark 2: seq 1 1000 | rust-parallel --disable-path-cache echo
Time (mean ± σ): 202.1 ms ± 0.9 ms [User: 234.2 ms, System: 831.7 ms]
Range (min … max): 200.1 ms … 203.4 ms 14 runs
Benchmark 3: seq 1 1000 | xargs -P8 -L1 echo
Time (mean ± σ): 241.9 ms ± 1.2 ms [User: 144.5 ms, System: 508.5 ms]
Range (min … max): 240.1 ms … 244.2 ms 12 runs
Benchmark 4: seq 1 1000 | parallel echo
Time (mean ± σ): 1.957 s ± 0.021 s [User: 2.545 s, System: 3.542 s]
Range (min … max): 1.942 s … 2.001 s 10 runs
Summary
seq 1 1000 | rust-parallel echo ran
1.29 ± 0.01 times faster than seq 1 1000 | rust-parallel --disable-path-cache echo
1.54 ± 0.01 times faster than seq 1 1000 | xargs -P8 -L1 echo
12.50 ± 0.14 times faster than seq 1 1000 | parallel echo