Word frequency
Tokenise a 1 MiB ASCII corpus and count word occurrences into a hash map.
Compile time · median (cold)
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs piko | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 10 | 181 ms | 18.0 ms | 18.3 ms | 154 µs | 68 MiB | 104× | OK |
| Piko interpbytecode VM | 10 | 1.74 ms | 182 ms | 185 ms | 1.85 ms | 307 MiB | 1.00× | OK |
| CPython 3.13bytecode VM | 10 | 452 µs | 313 ms | 324 ms | 6.94 ms | n/a | 0.26× | OK |
| PyPy 7.3tracing JIT | 10 | 387 µs | 40.8 ms | 46.0 ms | 1.89 ms | n/a | 0.22× | OK |
| tengobytecode VM | 10 | 332 µs | 788 ms | 936 ms | 61.5 ms | 5.36 GiB | 0.19× | OK |
| scriggobytecode VM | 10 | 653 µs | 417 ms | 432 ms | 7.69 ms | 1.12 GiB | 0.37× | OK |
| mvmbytecode VM | 10 | 506 µs | 696 ms | 755 ms | 31.4 ms | 71 MiB | 0.29× | OK |
| yaegiAST walker | 10 | 485 µs | 463 ms | 500 ms | 14.3 ms | 72 MiB | 0.28× | OK |
Workload & symmetry rules
Workload
Read a 1 MiB lorem corpus. Tokenise on whitespace + ASCII punctuation. Count occurrences in a map. Print the top-10 by frequency.
Symmetry rules
- Tokenisation by hand-rolled byte loop (no
str.splitC path, noregex). - Counting via the language's built-in map / dict.
- Top-10 via a simple sort, no
heapq.
Source code
piko / Go
piko_source.gonative Go
native_main.goCPython / PyPy
cpython.pytengo
script.tengo