From 8e3088997f43fb02d9b657f7e9d32ddd44d7d940 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sat, 14 Nov 2026 19:16:45 +0100 Subject: Re-run benchmarks for H48 and add comparison with egg-solver --- benchmarks/run-egg-benchmarks.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 benchmarks/run-egg-benchmarks.sh (limited to 'benchmarks/run-egg-benchmarks.sh') 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 @@ +scr="../nissy-core/benchmarks/scrambles" +out="../nissy-core/benchmarks/results_egg.py" + +get_solve_time() { + ./target/release/solve -t "$1" --table "tables/h$2" <"$3" \ + | tail -1 | sed 's/.*cubes wall //; s/ wall.*//' +} + +do_all() { + echo "doing all $1 $2" + t=$1 + name=$2 + printf '%s = {\n' "$name" >> "$out" + for i in 6 7 8 9 10 11 ; do + echo "Doing 17 moves for h$i with $t threads..." + t17="$(get_solve_time $t $i "$scr/scrambles-17.txt")" + echo "Doing 18 moves for h$i with $t threads..." + t18="$(get_solve_time $t $i "$scr/scrambles-18.txt")" + echo "Doing 19 moves for h$i with $t threads..." + t19="$(get_solve_time $t $i "$scr/scrambles-19.txt")" + printf '\t%s: {17: %s, 18: %s, 19: %s' $i $t17 $t18 $t19 >> "$out" + if [ "$i" -ge 10 ]; then + echo "Doing 20 moves for h$i with $t threads..." + t20="$(get_solve_time $t $i "$scr/scrambles-20.txt")" + printf ', 20: %s' $t20 >> "$out" + echo "Doing superflip moves for h$i with $t threads..." + tsf="$(get_solve_time $t $i "$scr/superflip.txt")" + printf ', "superflip": %s},\n' $tsf >> "$out" + else + printf '},\n' >> "$out" + fi + done + printf '}\n\n' >> "$out" +} + +printf '' > "$out" + +do_all 1 "egg_single_thread" +do_all 4 "egg_4_threads" +do_all 16 "egg_16_threads" -- cgit v1.3