Benchmarks - aaronriekenberg/rust-parallel GitHub Wiki
Test System
- 15-inch Macbook Air M2, 2023 (my personal laptop)
rust-parallel uses 8 parallel jobs by default on this machine
- MacOS 26.3
Test Setup
Summary
- rust-parallel is 9.88 times faster than GNU parallel
- rust-parallel is 2.09 times faster than xargs with 8 processes. Note that this use of xargs does not prevent output interleaving.
Versions
$ rust-parallel -V
rust-parallel 1.22.0
$ parallel -V
GNU parallel 20260222
Results
Benchmark 1: seq 1 1000 | rust-parallel echo
Time (mean ± σ): 232.1 ms ± 2.0 ms [User: 592.2 ms, System: 882.1 ms]
Range (min … max): 228.0 ms … 234.1 ms 12 runs
Benchmark 2: seq 1 1000 | xargs -P8 -L1 echo
Time (mean ± σ): 484.7 ms ± 8.0 ms [User: 439.0 ms, System: 855.6 ms]
Range (min … max): 475.4 ms … 504.9 ms 10 runs
Benchmark 3: seq 1 1000 | parallel echo
Time (mean ± σ): 2.293 s ± 0.017 s [User: 3.036 s, System: 3.891 s]
Range (min … max): 2.262 s … 2.329 s 10 runs
Summary
seq 1 1000 | rust-parallel echo ran
2.09 ± 0.04 times faster than seq 1 1000 | xargs -P8 -L1 echo
9.88 ± 0.11 times faster than seq 1 1000 | parallel echo