aboutsummaryrefslogtreecommitdiff
path: root/old/benchmark/bench.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2023-11-10 17:07:42 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2023-11-10 19:55:55 +0100
commit067ba55add258ab03db328234168af66c4ad87c3 (patch)
treef4861907117c420eed3f9c9aa967bf9f2c6a1f7e /old/benchmark/bench.sh
parentaf1399f223e3857a3d2690337e84430cdbeff16a (diff)
downloadnissy-core-067ba55add258ab03db328234168af66c4ad87c3.tar.gz
nissy-core-067ba55add258ab03db328234168af66c4ad87c3.zip
Towards a definitve API
Diffstat (limited to 'old/benchmark/bench.sh')
-rwxr-xr-xold/benchmark/bench.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/old/benchmark/bench.sh b/old/benchmark/bench.sh
new file mode 100755
index 0000000..cc31c1e
--- /dev/null
+++ b/old/benchmark/bench.sh
@@ -0,0 +1,21 @@
1#!/bin/sh
2
3CC="cc -std=c99 -O3 -D$CUBETYPE"
4if [ "$CUBETYPE" = "CUBE_AVX2" ]; then
5 CC="$CC -mavx2"
6fi
7
8BENCHBIN="benchmark/run"
9BENCHDIR="benchmark/results"
10CUBEOBJ="cube.o"
11
12$CC -D_POSIX_C_SOURCE=199309L -o $BENCHBIN benchmark/bench.c $CUBEOBJ || exit 1
13
14d="$(date +'%Y-%m-%d-%H-%M-%S')"
15mkdir -p "$BENCHDIR"
16$BENCHBIN | tee "$BENCHDIR/results-$d.txt" "$BENCHDIR/results.txt"
17
18echo ""
19echo "Results saved to $BENCHDIR/results.txt"
20
21rm -rf $BENCHBIN $CUBEOBJ

Generated with cgit - Back to sebastiano.tronto.net