move bench script

This commit is contained in:
Mitchell Hashimoto
2024-02-05 19:30:25 -08:00
parent 0c8dd34ea7
commit 03fceb81a5

20
src/bench/stream.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
#
# This is a trivial helper script to help run the stream benchmark.
# You probably want to tweak this script depending on what you're
# trying to measure.
DATA="ascii"
SIZE="25M"
# Uncomment to test with an active terminal state.
#ARGS=" --terminal"
hyperfine \
--warmup 10 \
-n memcpy \
"./zig-out/bin/bench-stream --mode=gen-${DATA} | head -c ${SIZE} | ./zig-out/bin/bench-stream --mode=noop${ARGS}" \
-n scalar \
"./zig-out/bin/bench-stream --mode=gen-${DATA} | head -c ${SIZE} | ./zig-out/bin/bench-stream --mode=scalar${ARGS}" \
-n simd \
"./zig-out/bin/bench-stream --mode=gen-${DATA} | head -c ${SIZE} | ./zig-out/bin/bench-stream --mode=simd${ARGS}"