-
Notifications
You must be signed in to change notification settings - Fork 8
Benchmarks
Aaron Riekenberg edited this page Apr 27, 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.4.1
- Run
echo
on 1000 strings1
to1000
- Benchmarks run using hyperfine testing tool
- Link to benchmark script
- rust-parallel is 1.38 times faster when the path cache is enabled (this is enabled by default)
- rust-parallel is 1.67 times faster than xargs with 8 processes. Note that this use of xargs does not prevent output interleaving.
- rust-parallel is 14.07 times faster than GNU parallel
$ rust-parallel -V
rust-parallel 1.18.0
$ parallel -V
GNU parallel 20240422
Benchmark 1: seq 1 1000 | rust-parallel echo
Time (mean ± σ): 139.5 ms ± 1.6 ms [User: 236.5 ms, System: 577.3 ms]
Range (min … max): 137.8 ms … 145.4 ms 21 runs
Benchmark 2: seq 1 1000 | rust-parallel --disable-path-cache echo
Time (mean ± σ): 191.8 ms ± 0.9 ms [User: 245.9 ms, System: 786.4 ms]
Range (min … max): 190.5 ms … 194.3 ms 15 runs
Benchmark 3: seq 1 1000 | xargs -P8 -L1 echo
Time (mean ± σ): 233.7 ms ± 1.4 ms [User: 151.0 ms, System: 451.8 ms]
Range (min … max): 230.8 ms … 236.6 ms 12 runs
Benchmark 4: seq 1 1000 | parallel echo
Time (mean ± σ): 1.963 s ± 0.042 s [User: 2.678 s, System: 3.094 s]
Range (min … max): 1.916 s … 2.072 s 10 runs
Summary
seq 1 1000 | rust-parallel echo ran
1.38 ± 0.02 times faster than seq 1 1000 | rust-parallel --disable-path-cache echo
1.67 ± 0.02 times faster than seq 1 1000 | xargs -P8 -L1 echo
14.07 ± 0.34 times faster than seq 1 1000 | parallel echo