1min.

1MIN · DEVELOPER TOOLS

A few hundred milliseconds can make benchmarks easier to use

Alex Kladov suggests sizing a microbenchmark so one run takes roughly 300 milliseconds. That is long enough to reduce the influence of fixed overheads such as process startup, yet short enough for repeated experiments. His goal is a quick feedback loop that helps an engineer judge an optimization, rather than a highly precise performance measurement.

matklad · Oct 5, 2026

Why it matters

A small change to benchmark design can make everyday optimization work faster to interpret.

More context

Try adjusting the input size while keeping the operation representative, then repeat runs to inspect variation. The advice is explicitly a rule of thumb for developing intuition, not a requirement to force every performance test into the same duration.

Keep in mind

This short practitioner note is not a statistical methodology or a latency target. Workload changes, warm-up effects and noise still need consideration when making precise performance claims.

Original read

More engineering ideas, one minute at a time.

Explore more stories