Smoke: integer addition
Sum 1..N in a tight loop, the smallest workload in the suite. It exists to surface interpreter dispatch overhead at the smallest possible payload.
Compile time · median (cold)
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs piko | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 10 | 178 ms | 24.9 µs | 28.3 µs | 1.01 µs | 68 MiB | 394× | OK |
| Piko interpbytecode VM | 10 | 452 µs | 444 µs | 449 µs | 2.77 µs | 78 MiB | 1.00× | OK |
| CPython 3.13bytecode VM | 10 | 185 µs | 1.53 ms | 1.84 ms | 116 µs | n/a | 0.41× | OK |
| PyPy 7.3tracing JIT | 10 | 166 µs | 481 µs | 510 µs | 13.9 µs | n/a | 0.37× | OK |
| tengobytecode VM | 10 | 140 µs | 5.06 ms | 5.66 ms | 341 µs | 84 MiB | 0.31× | OK |
| scriggobytecode VM | 10 | 131 µs | 4.48 ms | 4.56 ms | 537 µs | 70 MiB | 0.29× | OK |
| mvmbytecode VM | 10 | 138 µs | 2.81 ms | 3.43 ms | 511 µs | 57 MiB | 0.30× | OK |
| yaegiAST walker | 10 | 193 µs | 2.26 ms | 2.28 ms | 6.01 µs | 58 MiB | 0.43× | OK |
Workload & symmetry rules
Workload
Sum 1..1,000,000 in a single tight loop, print the result mod 2^32.
Why this benchmark exists
It's the simplest possible interpreter workload. If dispatch dominates anything, it dominates this. End-to-end mode is therefore mostly startup time; inner-loop mode is mostly add+jump throughput.
Symmetry rules
- One loop, two locals, no function calls in the hot path.
- No
sum()/numpy/strconvshortcuts.
Source code
piko / Go
piko_source.gonative Go
native_main.goCPython / PyPy
cpython.pytengo
script.tengo