aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/038-past-c/runs.sh
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-05 09:29:23 +0100
committereunhhu <[email protected]>2026-10-05 09:29:23 +0100
commit58b8d5b291422a0c12db590eefbad6efe96cc6de (patch)
tree3ea6eda47b9dc06269325c226f4c79c9df549035 /research/experiments/038-past-c/runs.sh
parent2654f58ae6a7d0fcaf356b0f4cd69038b3eaf00c (diff)
downloadpure-58b8d5b291422a0c12db590eefbad6efe96cc6de.tar.gz
pure-58b8d5b291422a0c12db590eefbad6efe96cc6de.zip
Design 022: stored lists as arrays with a bucket index fitted to the keys searched, narrow columns, a JIT with registers and loop guards, read ahead; criteria first
Diffstat (limited to 'research/experiments/038-past-c/runs.sh')
-rw-r--r--research/experiments/038-past-c/runs.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/research/experiments/038-past-c/runs.sh b/research/experiments/038-past-c/runs.sh
index 3da6196..05d301e 100644
--- a/research/experiments/038-past-c/runs.sh
+++ b/research/experiments/038-past-c/runs.sh
@@ -13,6 +13,12 @@
# without (PURE_JIT=0), in turns
# runs.sh bfs NAME 033's bfs.py on that build (100,000 nodes,
# 1,000,000 edges, 5 searches, 3 rounds)
+# runs.sh floor bfsfloor's forms in turns (9 searches)
+# runs.sh alone bfsfloor's forms each alone, warm (5
+# searches of 21 runs, 3 rounds)
+# runs.sh widths narrow and narrow_ahead alone with buckets
+# of 4, 16 and 32 items (2 rounds)
+# runs.sh roundtrip roundtrip.py on after (3 times)
set -e
here=research/experiments/038-past-c
builds=$HOME/.cache/pure-038
@@ -70,6 +76,30 @@ bfs)
until awk '{ exit !($1 < 1.5) }' /proc/loadavg; do sleep 10; done
python3 research/guard.py --most 2048 -- python3 research/experiments/033-computing/bfs.py "$builds/$2/pure-serve" \
../aup/build/aup 100000 1000000 5 3 > "$here/$day-bfs-$2.jsonl" ;;
-*) echo "runs.sh build NAME COMMIT | core FIRST LAST | pairs FIRST LAST | jit FIRST LAST | counts | bfs NAME" >&2
+floor|alone|widths)
+ cc -O2 -std=gnu17 -o "$builds/bfsfloor" $here/bfsfloor.c -lm
+ floor() { python3 research/guard.py --most 1024 -- "$builds/bfsfloor" 100000 1000000 "$@"; }
+ case "$1" in
+ floor) floor 9 16 8 > "$here/$day-bfsfloor.jsonl" ;;
+ alone)
+ for round in 1 2 3; do
+ for form in c narrow_ahead narrow c_ahead packed; do
+ floor 5 16 8 8 $form 21 | sed "s/^{/{\"round\":$round,/" >> "$here/$day-bfsfloor-alone.jsonl"
+ done
+ done ;;
+ widths)
+ for round in 1 2; do
+ for per in 4 16 32; do
+ for form in narrow_ahead narrow; do
+ floor 5 16 8 $per $form 21 | sed "s/^{/{\"round\":$round,/" >> "$here/$day-bfsfloor-widths.jsonl"
+ done
+ done
+ done ;;
+ esac ;;
+roundtrip)
+ for i in 1 2 3; do
+ taskset -c 3 python3 $here/roundtrip.py "$builds/after/pure-serve" "$builds/graph.pmod" >> "$here/$day-roundtrip.jsonl"
+ done ;;
+*) echo "runs.sh build NAME COMMIT | core FIRST LAST | pairs FIRST LAST | jit FIRST LAST | counts | bfs NAME | floor | alone | widths | roundtrip" >&2
exit 2 ;;
esac