tzhash/benchmark
Evgenii Stratonikov f4cc7726e9 benchmark: fix shellcheck issues
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-21 12:30:08 +03:00

14 lines
302 B
Bash
Executable file

#!/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
go build ./cmd/tzsum || exit 1
for impl in avx avx2 generic; do
echo $impl implementation:
time ./tzsum -name "$OUT" -impl $impl
echo
done