Markov text generation
Train a bigram Markov model on a 1 MiB corpus and emit 10,000 words.
Compile time · median (cold)
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs pipit | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 7 | 107 ms | 5.35 ms | 5.98 ms | 444 µs | 1.62 GiB | 78.2× | OK |
| Pipitbytecode VM | 7 | 1.37 ms | 23.0 ms | 24.8 ms | 655 µs | 591 MiB | 1.00× | OK |
| CPython 3.14bytecode VM | 7 | 443 µs | 27.5 ms | 28.0 ms | 264 µs | n/a | 0.32× | OK |
| PyPy 7.3tracing JIT | 7 | 335 µs | 11.3 ms | 12.2 ms | 641 µs | n/a | 0.24× | OK |
| tengobytecode VM | 7 | 232 µs | 51.2 ms | 70.8 ms | 6.97 ms | 1.69 GiB | 0.17× | OK |
| scriggobytecode VM | 7 | 411 µs | 50.5 ms | 51.4 ms | 401 µs | 1.69 GiB | 0.30× | OK |
| mvmbytecode VM | 7 | 386 µs | 57.5 ms | 58.1 ms | 256 µs | 1.69 GiB | 0.28× | OK |
| yaegiAST walker | 7 | 375 µs | 43.0 ms | 61.0 ms | 8.06 ms | 1.69 GiB | 0.27× | OK |
Workload & symmetry rules
Workload
Build a bigram model from a 1 MiB lorem corpus. Sample 10,000 tokens from a deterministic LCG-seeded RNG. Print a fingerprint of the output.
Symmetry rules
- Hand-rolled LCG (no
randomC module, nomath/rand). - Hash map of (prev → counts) built from a byte-loop tokeniser.
Source code
pipit / Go
pipit_source.gonative Go
native_main.goCPython / PyPy
cpython.pytengo
script.tengo