aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/run-vcube-benchmarks.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-12-17 09:26:53 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-12-17 09:26:53 +0100
commit36f37564cd566e91771cd1f92ac3886917c769d1 (patch)
tree037b21f46dafb4edce8aeef25fc3d6e1d607df12 /benchmarks/run-vcube-benchmarks.sh
parentc6ab40b1602443938e431b996b28fb3d888365bb (diff)
downloadnissy-core-36f37564cd566e91771cd1f92ac3886917c769d1.tar.gz
nissy-core-36f37564cd566e91771cd1f92ac3886917c769d1.zip
Update benchmarks
Diffstat (limited to 'benchmarks/run-vcube-benchmarks.sh')
-rwxr-xr-xbenchmarks/run-vcube-benchmarks.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/benchmarks/run-vcube-benchmarks.sh b/benchmarks/run-vcube-benchmarks.sh
new file mode 100755
index 0000000..801bad0
--- /dev/null
+++ b/benchmarks/run-vcube-benchmarks.sh
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3# This script can be used to run benchmarks for vcube, similar to the
4# benchmarks for H48 run by run-h48-benchmarks.sh. Before running this script,
5# move it to the vcube folder and and adjust the paths below if necessary.
6
7scr="../nissy-core/benchmarks/scrambles"
8out="../nissy-core/benchmarks/results_vcube.py"
9
10get_solve_time() {
11 ./vc-optimal -w "$1" -c "$2" <"$3" \
12 2>&1 >/dev/null | sed 's/Total time: //; s/ real.*//'
13}
14
15do_all() {
16 t=$1
17 name=$2
18 printf '%s = {\n' "$name" >> "$out"
19 for i in 112 208 308 404 212 ; do
20 t17="$(get_solve_time $t $i "$scr/scrambles-17.txt")"
21 t18="$(get_solve_time $t $i "$scr/scrambles-18.txt")"
22 t19="$(get_solve_time $t $i "$scr/scrambles-19.txt")"
23 printf '\t%s: {17: %s, 18: %s, 19: %s' $i $t17 $t18 $t19 >> "$out"
24 if [ "$i" -ge 212 ]; then
25 t20="$(get_solve_time $t $i "$scr/scrambles-20.txt")"
26 printf ', 20: %s' $t20 >> "$out"
27 if [ "$t" = 1 ]; then
28 tsf="$(get_solve_time $t $i "$scr/superflip.txt")"
29 printf ', "superflip": %s},\n' $tsf >> "$out"
30 else
31 printf '},\n' >> "$out"
32 fi
33 else
34 printf '},\n' >> "$out"
35 fi
36 done
37 printf '}\n\n' >> "$out"
38}
39
40printf '' > "$out"
41
42do_all 1 "vcube_single_thread"
43do_all 4 "vcube_4_threads"
44do_all 16 "vcube_16_threads"

Generated with cgit - Back to sebastiano.tronto.net