aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/041-batches/costs/sum0.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/sum0.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/sum0.aup')
-rw-r--r--research/experiments/041-batches/costs/sum0.aup13
1 files changed, 13 insertions, 0 deletions
diff --git a/research/experiments/041-batches/costs/sum0.aup b/research/experiments/041-batches/costs/sum0.aup
new file mode 100644
index 0000000..27e11bc
--- /dev/null
+++ b/research/experiments/041-batches/costs/sum0.aup
@@ -0,0 +1,13 @@
+state out = 0
+input go = message {
+ n: u32
+}
+on go {
+ let total = 0
+ for i in 0 .. go.n * 20 {
+ let f = i + 1
+ total = total + 1
+ let z = f
+ }
+ out = total
+}