aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/run-egg-benchmarks.sh
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-11-14 19:16:45 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2026-11-14 19:16:45 +0100
commit8e3088997f43fb02d9b657f7e9d32ddd44d7d940 (patch)
tree37aa89e95abce52f612d0420a92ca725ccf2540b /benchmarks/run-egg-benchmarks.sh
parent78dfb356bce3ebb9bbb537d2f95e35246ab9a427 (diff)
downloadnissy-core-8e3088997f43fb02d9b657f7e9d32ddd44d7d940.tar.gz
nissy-core-8e3088997f43fb02d9b657f7e9d32ddd44d7d940.zip
Re-run benchmarks for H48 and add comparison with egg-solver
Diffstat (limited to 'benchmarks/run-egg-benchmarks.sh')
-rwxr-xr-xbenchmarks/run-egg-benchmarks.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/benchmarks/run-egg-benchmarks.sh b/benchmarks/run-egg-benchmarks.sh
new file mode 100755
index 0000000..d29db27
--- /dev/null
+++ b/benchmarks/run-egg-benchmarks.sh
@@ -0,0 +1,40 @@
1scr="../nissy-core/benchmarks/scrambles"
2out="../nissy-core/benchmarks/results_egg.py"
3
4get_solve_time() {
5 ./target/release/solve -t "$1" --table "tables/h$2" <"$3" \
6 | tail -1 | sed 's/.*cubes wall //; s/ wall.*//'
7}
8
9do_all() {
10 echo "doing all $1 $2"
11 t=$1
12 name=$2
13 printf '%s = {\n' "$name" >> "$out"
14 for i in 6 7 8 9 10 11 ; do
15 echo "Doing 17 moves for h$i with $t threads..."
16 t17="$(get_solve_time $t $i "$scr/scrambles-17.txt")"
17 echo "Doing 18 moves for h$i with $t threads..."
18 t18="$(get_solve_time $t $i "$scr/scrambles-18.txt")"
19 echo "Doing 19 moves for h$i with $t threads..."
20 t19="$(get_solve_time $t $i "$scr/scrambles-19.txt")"
21 printf '\t%s: {17: %s, 18: %s, 19: %s' $i $t17 $t18 $t19 >> "$out"
22 if [ "$i" -ge 10 ]; then
23 echo "Doing 20 moves for h$i with $t threads..."
24 t20="$(get_solve_time $t $i "$scr/scrambles-20.txt")"
25 printf ', 20: %s' $t20 >> "$out"
26 echo "Doing superflip moves for h$i with $t threads..."
27 tsf="$(get_solve_time $t $i "$scr/superflip.txt")"
28 printf ', "superflip": %s},\n' $tsf >> "$out"
29 else
30 printf '},\n' >> "$out"
31 fi
32 done
33 printf '}\n\n' >> "$out"
34}
35
36printf '' > "$out"
37
38do_all 1 "egg_single_thread"
39do_all 4 "egg_4_threads"
40do_all 16 "egg_16_threads"

Generated with cgit - Back to sebastiano.tronto.net