• Sources: primary, discussion
  • Summary: The rule is to adjust input size until a microbenchmark takes roughly 300ms. The reasoning is specific: milliseconds in the 1 to 999 range are integers that scan visually without unit switching, anything under about 10ms risks being dominated by fixed costs such as interpreter startup, hundreds of milliseconds is long enough to make one-off overheads irrelevant without more fragile correction techniques, and anything over a second makes running the benchmark ten times to eyeball variance too slow.
  • Why it matters: The underlying claim is that benchmarking exists to give the author enough intuition to make a correct decision rather than to produce a precise performance measurement, which is directly applicable to anyone writing a benchmark harness.