Skip to content

Benchmarks

Milo compiles via LLVM with -O2 — the same backend as C and Rust. On most workloads it lands within noise of C.

Results

MiloCGo
matmul 512×512
12ms
12.8ms
13.2ms
binarytrees depth 18
3ms
3.9ms
10.5ms
quicksort 2M f64
34.7ms
35.7ms
34.7ms
startup empty main
1.2ms
1.2ms
1.5ms
stringops 100k concat
3.2ms
3.1ms
6.5ms
fib(42)
20.8ms
18.4ms
21.6ms
sieve to 10M
2.5ms
2.1ms
3.4ms
maplookup 100k
4.4ms
3.3ms
5ms
grep -c 5MB
5.5ms
2.1ms
4ms
json parse+walk 1MB
7.1ms
1.6ms*
9.7ms

Apple M-series, macOS. *C uses yyjson; Go and Milo use their stdlibs.

Notes

  • Values < 1.0x mean Milo is faster than C (usually within measurement noise)
  • 4 benchmarks match or beat C; 3 more within 20%
  • Slower entries (grep, maplookup) have known hot spots — not fundamental limits
  • Go's GC overhead shows clearly in allocation-heavy benchmarks (binarytrees 3.5x slower)
  • JSON: flat pool parser with source-offset strings — ~6 allocations for any document size. Beats Go; remaining gap vs C is stdlib-vs-yyjson

Reproduce

bash
./benchmarks/run.sh