matklad's rule of thumb: run micro benchmarks for about 300ms, and here's why

jedisct1 · x · 2026-10-09

matklad (TigerBeetle) lays out a rule of thumb for micro benchmarks: tune input size until a run takes 300ms. Millisecond integers give enough precision to spot small wins; runs under 10ms get skewed by fixed costs like interpreter startup; hundreds of milliseconds sit in the human-perceptible range so intuition works; and it stays fast enough to iterate and eyeball variance across 10 runs. The underlying assumption: benchmarking is about building intuition for decisions, not precise measurement.

Original post →

More from coding & agent

coding & agent channel →