Performance¶
Call true 256 times, running 4 processes in parallel:
Tool |
Version |
Time |
---|---|---|
Para |
0.11 |
0.04 secs |
9.1.0 |
0.13 secs |
|
20241022 |
0.70 secs |
|
1.18.1 |
0.04 secs |
Times are averages taken from 1,000 runs.
Commands¶
Create a list of 256 true’s:
cmds=
for _ in $(seq 0 255)
do cmds="${cmds}true "
done
Para:
for _ in $(seq 0 999)
do command time para -j4 -l0 ${cmds:?}
done 2>&1 |
awk 'BEGIN {total=0} {total += $1} END {print (total/NR)}'
Concurrently:
for _ in $(seq 0 999)
do command time concurrently -k -m 4 -r ${cmds:?}
done 2>&1 |
awk 'BEGIN {total=0} {total += $1} END {print (total/NR)}'
GNU Parallel:
for _ in $(seq 0 999)
do command time parallel -j 4 --halt now,fail=1 ::: ${cmds:?}
done 2>&1 |
awk 'BEGIN {total=0} {total += $1} END {print (total/NR)}'
rust-parallel:
for _ in $(seq 0 999)
do command time rust-parallel -j 4 --exit-on-error ::: ${cmds:?}
done 2>&1 |
awk 'BEGIN {total=0} {total += $1} END {print (total/NR)}'