https://matklad.github.io/2026/10/05/benchmark-milliseconds.html
Worth reading the reasoning, but the tl;dr; is to increase inputs sizes till the thing you are benchmarking takes ~300ms, then optimize from there.
matklad.github.ioBenchmark In MillisecondsHow long should a micro benchmark run? My rule of thumb is to tweak the input size until the benchmark takes about 300ms, for the following reasons:
commit 8336f4b