-
Notifications
You must be signed in to change notification settings - Fork 8
Benchmarks
Aaron Riekenberg edited this page Feb 11, 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.37 times faster when the path cache is enabled (this is enabled by default)
- rust-parallel is 2.10 times faster than xargs with 8 processes. Note that this use of xargs does not prevent output interleaving.
- rust-parallel is 11.95 times faster than GNU parallel
$ rust-parallel -V
rust-parallel 1.15.0
$ parallel -V
GNU parallel 20240122
Benchmark 1: seq 1 1000 | rust-parallel echo
Time (mean ± σ): 162.2 ms ± 0.7 ms [User: 216.2 ms, System: 586.2 ms]
Range (min … max): 160.4 ms … 163.7 ms 18 runs
Benchmark 2: seq 1 1000 | rust-parallel --disable-path-cache echo
Time (mean ± σ): 222.1 ms ± 1.2 ms [User: 257.1 ms, System: 849.6 ms]
Range (min … max): 220.1 ms … 223.9 ms 13 runs
Benchmark 3: seq 1 1000 | xargs -P8 -L1 echo
Time (mean ± σ): 340.7 ms ± 2.0 ms [User: 153.6 ms, System: 511.8 ms]
Range (min … max): 337.2 ms … 345.0 ms 10 runs
Benchmark 4: seq 1 1000 | parallel echo
Time (mean ± σ): 1.938 s ± 0.007 s [User: 2.535 s, System: 3.517 s]
Range (min … max): 1.920 s … 1.946 s 10 runs
Summary
seq 1 1000 | rust-parallel echo ran
1.37 ± 0.01 times faster than seq 1 1000 | rust-parallel --disable-path-cache echo
2.10 ± 0.02 times faster than seq 1 1000 | xargs -P8 -L1 echo
11.95 ± 0.07 times faster than seq 1 1000 | parallel echo