diff options
| author | eunhhu <[email protected]> | 2026-10-19 11:51:58 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-19 11:51:58 +0100 |
| commit | 5db97c60b953205e68d273b9b56424d346fa750d (patch) | |
| tree | 03f0328c53e0ec2cf19d4ad2f71128099151ab48 /research/experiments/045-proof-compiler/units/call.aup | |
| parent | b14e968e7f4f70897809a7ba6d8495f2b78c95f6 (diff) | |
| download | pure-5db97c60b953205e68d273b9b56424d346fa750d.tar.gz pure-5db97c60b953205e68d273b9b56424d346fa750d.zip | |
045: 029's principle 1 broken on UAX #14 before any emitter, the tools and the numbers: (a) the executor runs 549.9 instructions a code point (the budget's 1,774 counts blocks as written), moves 205.5, constants 76.7 and reads of the same list, version, field and place in an event 16.4, so merging leaves 251.3: 2.19x, the bar 4x (ops-count.patch); (b) the executor's own steps stitched on constant instructions, a function a basic block (stitch.c, native-hook.patch), answers checked: 40,703 to 28,601 machine instructions a point, 15,566 to 11,850 cycles: 1.31x, the bar 3x (cost.c); Vega's C 220 and 82; where it goes: dispatch 22 machine instructions an instruction of 74, an empty handler 1,583 a point, the lists built 22,651 more, the Text record 2,951, decide 12,988 (events.c, variants); a stored list's read 331, a block fn's call 1,375, an arithmetic step 248 in the executor and 35 in batches (unit.c, units)
Diffstat (limited to 'research/experiments/045-proof-compiler/units/call.aup')
| -rw-r--r-- | research/experiments/045-proof-compiler/units/call.aup | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/research/experiments/045-proof-compiler/units/call.aup b/research/experiments/045-proof-compiler/units/call.aup new file mode 100644 index 0000000..ef31ef6 --- /dev/null +++ b/research/experiments/045-proof-compiler/units/call.aup @@ -0,0 +1,11 @@ +state t = 0 +input go = message { n: u32 } +fn f(x) { + if x > 1000000 { return 0 } + return x + 1 +} +on go { + let s = 0 + for i in 0 .. go.n { s = s + f(i) } + t = s +} |
