Iterative Fibonacci
Compute fib(100k) mod 2^64 with hand-rolled integer-to-decimal. Tests integer arithmetic and tight-loop dispatch.
Compile time · median (cold)
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs piko | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 10 | 183 ms | 114 µs | 115 µs | 1.43 µs | 68 MiB | 299× | OK |
| Piko interpbytecode VM | 10 | 611 µs | 6.58 ms | 9.55 ms | 1.02 ms | 82 MiB | 1.00× | OK |
| CPython 3.13bytecode VM | 10 | 200 µs | 17.1 ms | 17.7 ms | 315 µs | n/a | 0.33× | OK |
| PyPy 7.3tracing JIT | 10 | 182 µs | 8.10 ms | 9.38 ms | 480 µs | n/a | 0.30× | OK |
| tengobytecode VM | 0 | n/a | n/a | n/a | n/a | n/a | n/a | unsupported |
| scriggobytecode VM | 10 | 142 µs | 15.3 ms | 18.0 ms | 812 µs | 70 MiB | 0.23× | OK |
| mvmbytecode VM | 10 | 144 µs | 33.7 ms | 53.1 ms | 7.12 ms | 62 MiB | 0.24× | OK |
| yaegiAST walker | 10 | 189 µs | 28.1 ms | 32.0 ms | 1.19 ms | 62 MiB | 0.31× | OK |
Workload & symmetry rules
Workload
100,000 iterations of next = (a + b) & 0xFFFFFFFFFFFFFFFF, then hand-rolled int-to-decimal of the result.
Symmetry rules
- Hand-rolled int-to-decimal in every runner (no
strconv.FormatUint, nostr(), nof"{n}"). - Pure integer arithmetic; no
mathcalls. - Explicit 64-bit mask in Python so it matches Go's
uint64wrap.
Why this is a fair interpreter benchmark
Every step of the work is interpreter-bound; halving dispatch overhead halves the wall time. There is no library call on the hot path.
Source code
piko / Go
piko_source.gonative Go
native_main.goCPython / PyPy
cpython.py