Mini JSON parse
Hand-rolled JSON parser over a 100 KiB document with mixed nesting.
Runtime · median per inner-loop window
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs pipit | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 7 | 113 ms | 13.6 ms | 14.7 ms | 534 µs | 451 MiB | 0.12× | OK |
| Pipitbytecode VM | 7 | 2.85 ms | 117 ms | 122 ms | 2.07 ms | 311 MiB | 1.00× | OK |
| CPython 3.14bytecode VM | 7 | 908 µs | 171 ms | 180 ms | 4.07 ms | n/a | 1.46× | OK |
| PyPy 7.3tracing JIT | 7 | 697 µs | 121 ms | 138 ms | 8.26 ms | n/a | 1.03× | OK |
| tengobytecode VM | 0 | n/a | n/a | n/a | n/a | n/a | n/a | no data |
| scriggobytecode VM | 0 | n/a | n/a | n/a | n/a | n/a | n/a | unsupported |
| mvmbytecode VM | 7 | 864 µs | 348 ms | 401 ms | 21.8 ms | 1.52 GiB | 2.98× | OK |
| yaegiAST walker | 7 | 852 µs | 1.65 s | 1.77 s | 73.5 ms | 1.52 GiB | 14.1× | OK |
Workload & symmetry rules
Workload
Parse a 100 KiB JSON document into a generic tree, then walk the tree and sum every integer node. Print the sum.
Symmetry rules
- Hand-rolled recursive-descent parser; no
encoding/json, nojson.loads. - Returns a tagged-union tree, walked by switch/match.
Source code
pipit / Go
pipit_source.gonative Go
native_main.goCPython / PyPy
cpython.py