Benchmarks
About 388 wordsAbout 1 min
2026-07-10
Benchmarks compare MoonBit encode/decode/load performance against Python tokenizers on the same corpora.
Charts
Performance Summary
Pipeline
Commands
python3 scripts/fetch_models.py
pip install tokenizers numpy
python3 scripts/gen_parity.py
moon bench --target native
python3 scripts/bench_compare.py --target native --corpus mixed
python3 scripts/bench_compare.py --target native --corpus all --fail-above 1.10
# Generate ECharts from benchmark report
node scripts/gen-bench-charts.mjs reports/bench-native-mixed.jsonReading Results
| Moon/HF ratio | Interpretation |
|---|---|
< 0.90x | MoonBit is faster on this case |
0.90x .. 1.10x | Same range |
> 1.10x | Optimization candidate or regression |
Published performance claims should quote the comparison ratio, not standalone moon bench output.
The page reads /benchmarks/latest.json at runtime. CI writes the raw reports/bench-native-mixed.json artifact from bench_compare.py --json-out, then the docs build converts that report into the static JSON consumed here. ECharts are generated from the same report via gen-bench-charts.mjs.