ShellScript? 概要 †
早くなります †time seq 1000 | parallel -j 1 ./a.out | sort -n 3.6s time seq 1000 | parallel -j 8 ./a.out | sort -n 1.3s time seq 1000 | parallel ./a.out | sort -n #指定しないとコア数分並列化 1.3s
使用ケース †
ls orig/* | parallel -j 10 "echo < {} > {}.log"
cat big_size.txt | parallel --pipe -L 10000 "awk '{n+=$1}END{print n}'" > compressed
lr=(0 0.05 0.10) units=(100 200 300) parallel "./a.out {1} {2} > {1}_{2}.log" \ ::: ${lr[@]} ::: ${units[@]} |