-
Notifications
You must be signed in to change notification settings - Fork 9
Benchmarks
Aaron Riekenberg edited this page Apr 15, 2023
·
102 revisions
- 2017 MacBook Pro (my personal laptop)
- 2.8 GHz Quad-Core Intel Core i7
- 4 physical cores:
hw.physicalcpu: 4
- 2 threads per core, 8 threads total:
hw.logicalcpu: 8
-
rust-parallel
uses 8 parallel jobs by default on this machine
- 4 physical cores:
- 16GB RAM
- MacOS 13.3.1
-
rust-parallel
is more than an order of magnitude faster than GNU Parallel in tests below (~13-14 times faster) -
rust-parallel
is ~30% faster than command linexargs
with 8 processes.
rust-parallel 0.439 seconds real time elapsed (~31% faster than xargs -P8, ~13x faster than GNU Parallel)
$ rust-parallel -V
rust-parallel 0.5.3
$ time head -1000 /usr/share/dict/words | rust-parallel md5 -s > file
rust-parallel md5 -s > file 0.87s user 2.09s system 675% cpu 0.439 total
$ time head -1000 /usr/share/dict/words | xargs -P8 -n1 md5 -s > file
xargs -P8 -n1 md5 -s > file 0.65s user 1.60s system 356% cpu 0.633 total
GNU Parallel 5.755 seconds real time elapsed
$ parallel -V
GNU parallel 20230322
$ time head -1000 /usr/share/dict/words | parallel md5 -s > file
parallel md5 -s > file 4.48s user 7.73s system 212% cpu 5.755 total
rust-parallel 4.249 seconds real time elapsed (~32% faster than xargs -P8, ~14x faster than GNU Parallel)
$ rust-parallel -V
rust-parallel 0.5.3
$ time head -10000 /usr/share/dict/words | rust-parallel md5 -s > file
rust-parallel md5 -s > file 8.59s user 20.64s system 687% cpu 4.249 total
$ time head -10000 /usr/share/dict/words | xargs -P8 -n1 md5 -s > file
xargs -P8 -n1 md5 -s > file 6.49s user 15.84s system 359% cpu 6.210 total
GNU Parallel 60.13 seconds real time elapsed
$ parallel -V
GNU parallel 20230322
$ time head -10000 /usr/share/dict/words | parallel md5 -s > file
parallel md5 -s > file 45.85s user 81.78s system 212% cpu 1:00.13 total