Methodology
About 141 wordsLess than 1 minute
2026-07-10
Benchmark work follows three rules:
- Compare MoonBit and Python
tokenizerson the same model and corpus. - Keep correctness fixtures passing before interpreting speed.
- Treat
Moon/HF > 1.10xas a concrete optimization backlog item.
Corpora
| Corpus | Purpose |
|---|---|
short | Interactive overhead and chat-style snippets |
mixed | English, CJK and punctuation paragraph |
code | MoonBit-like code and identifiers |
long | Long-document BPE/Unigram stress |
Outputs
bench_compare.py can write JSON artifacts for CI or dashboards:
python3 scripts/bench_compare.py --target native --corpus all \
--fail-above 1.10 --json-out reports/bench-native-all.jsonFor the documentation site, convert a raw benchmark report into the static snapshot consumed by the performance page:
node scripts/update-docs-benchmarks.mjs reports/bench-native-all.jsonCI keeps the raw reports/bench-native-mixed.json as an artifact, while Pages uses docs/.vuepress/public/benchmarks/latest.json for the rendered chart and table.