aboutsummaryrefslogtreecommitdiffstats
path: root/research/experiments/041-batches/costs/sum6.aup
diff options
context:
space:
mode:
Diffstat (limited to 'research/experiments/041-batches/costs/sum6.aup')
-rw-r--r--research/experiments/041-batches/costs/sum6.aup18
1 files changed, 18 insertions, 0 deletions
diff --git a/research/experiments/041-batches/costs/sum6.aup b/research/experiments/041-batches/costs/sum6.aup
new file mode 100644
index 0000000..772287b
--- /dev/null
+++ b/research/experiments/041-batches/costs/sum6.aup
@@ -0,0 +1,18 @@
+state out = 0
+input go = message {
+ n: u32
+}
+on go {
+ let total = 0
+ for i in 0 .. go.n * 20 {
+ let a = i + 1
+ let b = a + 2
+ let c = b + 3
+ let d = c + 4
+ let e = d + 5
+ let f = e + 6
+ total = total + 1
+ let z = f
+ }
+ out = total
+}