-
Notifications
You must be signed in to change notification settings - Fork 8
Benchmarks
Aaron Riekenberg edited this page Jan 28, 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.41 times faster when the path cache is enabled (this is enabled by default)
- rust-parallel is 2.12 times faster than xargs with 8 processes. Note that this use of xargs does not prevent output interleaving.
- rust-parallel is 11.90 times faster than GNU parallel
$ rust-parallel -V
rust-parallel 1.14.0
$ parallel -V
GNU parallel 20240122
Benchmark 1: seq 1 1000 | rust-parallel echo
Time (mean ± σ): 163.2 ms ± 0.9 ms [User: 216.8 ms, System: 593.0 ms]
Range (min … max): 161.1 ms … 164.7 ms 17 runs
Benchmark 2: seq 1 1000 | rust-parallel --disable-path-cache echo
Time (mean ± σ): 229.7 ms ± 1.4 ms [User: 259.2 ms, System: 886.7 ms]
Range (min … max): 227.5 ms … 232.1 ms 13 runs
Benchmark 3: seq 1 1000 | xargs -P8 -L1 echo
Time (mean ± σ): 346.7 ms ± 1.8 ms [User: 153.3 ms, System: 516.1 ms]
Range (min … max): 342.5 ms … 349.3 ms 10 runs
Benchmark 4: seq 1 1000 | parallel echo
Time (mean ± σ): 1.943 s ± 0.021 s [User: 2.539 s, System: 3.510 s]
Range (min … max): 1.922 s … 1.997 s 10 runs
Summary
seq 1 1000 | rust-parallel echo ran
1.41 ± 0.01 times faster than seq 1 1000 | rust-parallel --disable-path-cache echo
2.12 ± 0.02 times faster than seq 1 1000 | xargs -P8 -L1 echo
11.90 ± 0.14 times faster than seq 1 1000 | parallel echo