aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/041-batches
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-08 13:08:06 +0100
committereunhhu <[email protected]>2026-10-08 13:08:06 +0100
commit43815a41bfab2f561bf69ecb0bd5de75bef3678a (patch)
treedf9ad5dbac5276ed0c4d62f3620e78a1d901ae4a /research/experiments/041-batches
parentee4e1510819a916bf84cd4b560b05f520d32e86b (diff)
downloadpure-43815a41bfab2f561bf69ecb0bd5de75bef3678a.tar.gz
pure-43815a41bfab2f561bf69ecb0bd5de75bef3678a.zip
Research 132 (no code): where the batch executor's cost sits (an element's passes through memory; a batch's fixed cost about 6,500 instructions, 1 us, measured by 1024 against 256 lanes: fewer lanes are slower, so 024's L1 sizing was the wrong lever; a candidate's tail about 250), what the database literature measured of the same shape (X100, Kersten 2018's cycles and instructions a tuple, Sompolski 2011, Gubner 2017's in-register aggregation, Photon, Ertl and Gregg), the ways judged by the philosophy (a batch program made once at load; register tiles with threaded dispatch as the one general way past the floor; a table of fused operations and AOT C out), and the deciding experiment with its bar first (three bodies in tiles of 4, 8, 16: within 1.3x the compiled code's cycles an element, or it is not the answer); 041 lanes data
Diffstat (limited to 'research/experiments/041-batches')
-rw-r--r--research/experiments/041-batches/2026-10-08-lanes.jsonl24
-rwxr-xr-xresearch/experiments/041-batches/runs.sh4
2 files changed, 28 insertions, 0 deletions
diff --git a/research/experiments/041-batches/2026-10-08-lanes.jsonl b/research/experiments/041-batches/2026-10-08-lanes.jsonl
new file mode 100644
index 0000000..db5d768
--- /dev/null
+++ b/research/experiments/041-batches/2026-10-08-lanes.jsonl
@@ -0,0 +1,24 @@
+{"version": "b9", "lanes": 1024, "work": "knapsack", "ms": [11.43, 11.49]}
+{"version": "b9", "lanes": 512, "work": "knapsack", "ms": [15.685, 15.761]}
+{"version": "b9", "lanes": 256, "work": "knapsack", "ms": [24.516, 24.585]}
+{"version": "b9", "lanes": 1024, "work": "roots", "ms": [8.972, 8.972]}
+{"version": "b9", "lanes": 512, "work": "roots", "ms": [9.505, 9.513]}
+{"version": "b9", "lanes": 256, "work": "roots", "ms": [10.789, 13.614]}
+{"version": "b9", "lanes": 1024, "work": "join", "ms": [117.102, 117.147]}
+{"version": "b9", "lanes": 512, "work": "join", "ms": [120.545, 126.901]}
+{"version": "b9", "lanes": 256, "work": "join", "ms": [125.65, 126.873]}
+{"version": "b9", "lanes": 1024, "work": "matmul", "ms": [40.042, 40.163]}
+{"version": "b9", "lanes": 512, "work": "matmul", "ms": [40.025, 40.476]}
+{"version": "b9", "lanes": 256, "work": "matmul", "ms": [39.941, 40.077]}
+{"version": "b9", "lanes": 1024, "work": "bfs", "ms": [24.265, 31.357]}
+{"version": "b9", "lanes": 512, "work": "bfs", "ms": [24.66, 24.775]}
+{"version": "b9", "lanes": 256, "work": "bfs", "ms": [25.974, 26.22]}
+{"version": "b9", "lanes": 1024, "work": "sort", "ms": [57.433, 59.233]}
+{"version": "b9", "lanes": 512, "work": "sort", "ms": [56.898, 57.247]}
+{"version": "b9", "lanes": 256, "work": "sort", "ms": [57.248, 57.819]}
+{"version": "b9", "lanes": 1024, "module": "sum0", "n": 51200, "instructions": 47885499, "cycles": 16209194}
+{"version": "b9", "lanes": 256, "module": "sum0", "n": 51200, "instructions": 68855384, "cycles": 23451153}
+{"version": "b9", "lanes": 1024, "module": "ops0", "n": 51200, "instructions": 66412063, "cycles": 30359218}
+{"version": "b9", "lanes": 256, "module": "ops0", "n": 51200, "instructions": 85341947, "cycles": 36828120}
+{"version": "b9", "lanes": 1024, "module": "nest", "n": 200, "instructions": 240741778, "cycles": 99699878}
+{"version": "b9", "lanes": 256, "module": "nest", "n": 200, "instructions": 240612644, "cycles": 102318427}
diff --git a/research/experiments/041-batches/runs.sh b/research/experiments/041-batches/runs.sh
index 190a3d2..6f3a4e8 100755
--- a/research/experiments/041-batches/runs.sh
+++ b/research/experiments/041-batches/runs.sh
@@ -44,3 +44,7 @@ counts)
*) echo "runs.sh suite NAME ROUNDS [WORK ...] | counts NAME [WORK ...]" >&2
exit 2 ;;
esac
+# 2026-10-08-lanes.jsonl (research 132): b9's code with BATCH 1024, 512 and
+# 256 (core/module-batch.c's enum), suite-run 5 rounds twice (ms: the two
+# medians) and costs/time.c's sum0, ops0 and nest under icount 3 rounds:
+# a batch's fixed cost is (the instructions' difference) / (the batches').