aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/041-batches/costs/adds.aup
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-06 04:32:27 +0100
committereunhhu <[email protected]>2026-10-06 04:32:27 +0100
commit15d1ac33dbc54962578726d0add3d08137154457 (patch)
treea884b3684c33f1a8b85fff28dc8e31c6c757fde2 /research/experiments/041-batches/costs/adds.aup
parentc67f98812b8db0ffe6a73f7d863126cd90f66e56 (diff)
downloadpure-15d1ac33dbc54962578726d0add3d08137154457.tar.gz
pure-15d1ac33dbc54962578726d0add3d08137154457.zip
041 runs of stages 4 and 5, sums into cells and walks (b3 = 06c2978, b4 = c67f988): batches join 161.2 ms (the compiled code 74.4, alone 423.4), matmul 46.1, knapsack 15.1, roots 9.22; costs/: small modules timed three ways (an instruction about 20 ns a batch, a sum's end about 4 ns a round, an append about 100 ns as the executor's, the nested rounds 10.2 ms against the compiled code's 23.1)
Diffstat (limited to 'research/experiments/041-batches/costs/adds.aup')
-rw-r--r--research/experiments/041-batches/costs/adds.aup15
1 files changed, 15 insertions, 0 deletions
diff --git a/research/experiments/041-batches/costs/adds.aup b/research/experiments/041-batches/costs/adds.aup
new file mode 100644
index 0000000..9dcf3df
--- /dev/null
+++ b/research/experiments/041-batches/costs/adds.aup
@@ -0,0 +1,15 @@
+record Cell {
+ at = 0
+ v = 0
+}
+state out = 0
+input go = message {
+ n: u32
+}
+on go {
+ let table: list of Cell by at
+ for c in 0 .. go.n * 50 {
+ table.add(Cell { at: c })
+ }
+ out = table.count
+}