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
Milo
12ms
C
12.8ms
Go
13.2ms
binarytrees depth 18
Milo
3ms
C
3.9ms
Go
10.5ms
quicksort 2M f64
Milo
34.7ms
C
35.7ms
Go
34.7ms
startup empty main
Milo
1.2ms
C
1.2ms
Go
1.5ms
stringops 100k concat
Milo
3.2ms
C
3.1ms
Go
6.5ms
fib(42)
Milo
20.8ms
C
18.4ms
Go
21.6ms
sieve to 10M
Milo
2.5ms
C
2.1ms
Go
3.4ms
maplookup 100k
Milo
4.4ms
C
3.3ms
Go
5ms
grep -c 5MB
Milo
5.5ms
C
2.1ms
Go
4ms
json parse+walk 1MB
Milo
7.1ms
C
1.6ms*
Go
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