tzhash/benchmark.sh

13 lines
274 B
Bash
Raw Normal View History

2018-12-29 13:04:17 +00:00
#!/bin/bash
BLOCK_SIZE=${1:-1G} # gigabyte by default
OUT="${OUT:-$(mktemp /tmp/random-file.XXXXXX)}"
dd if=/dev/urandom of="$OUT" bs="$BLOCK_SIZE" count=1
2018-12-29 13:04:17 +00:00
for impl in avx avx2 generic; do
echo $impl implementation:
time ./bin/tzsum -name "$OUT" -impl $impl
echo
2018-12-29 13:04:17 +00:00
done