Size a micro-benchmark so one run takes 300 milliseconds
matklad's rule for micro-benchmarks: tweak the input until one run takes about 300 milliseconds, keeping results readable and free of fixed-cost noise.
matklad’s rule for sizing a micro-benchmark is to tweak the input until one run takes about 300 milliseconds. The target is deliberate, and the reasoning transfers to any benchmark you write.
Start with readability. At hundreds of milliseconds, every result is an integer between 1 and 999. That is enough precision to catch a small improvement and easy to scan by eye. You never juggle units or squint at a decimal point; comparing 1.31s with 239ms takes a beat, while a column of three-digit millisecond numbers reads at a glance.
Next, the noise floor. Below roughly 10ms, fixed costs start to dominate the measurement. Interpreter startup, process spin-up, a one-off allocation: those overheads skew a short run, and the usual remedy is to measure and subtract them, which adds machinery that is itself less reliable. At hundreds of milliseconds the per-run overhead becomes a rounding error, so you can ignore it without any special handling.
Third, human perception. Hundreds of milliseconds is fast but still noticeable, so keeping the number in that range lets you use your own sense of time instead of relying only on the digits. The payoff is concrete: watching a sluggish CLI command become “instant” after an optimization pass tells you something the raw figure alone does not.
Fourth, iteration speed. Past a second, the benchmark itself becomes the bottleneck. If you want to run it ten times in a row to eyeball the variance, each run has to be cheap, and 300ms lets you do that in a few seconds.
Underneath all four reasons sits one assumption that matklad states plainly: the purpose of this kind of benchmarking is to give the author enough intuition to make a correct decision about a change, not to produce a precise measurement of performance. Size the benchmark for the human reading it, and hundreds of milliseconds is where the number stays both readable and resistant to noise.
Keep Reading
quantizationFour bits, then a cliff
Benchmarks show Qwen3.8 27B keeps full quality at 4-bit but collapses to random-guess scores at 1-bit, with guidance on which quant to run locally.
vulnerabilityCISA adds exploited Puppet Server RCE to KEV catalog
CVE-2026-115731 is a CVSS 9.4 deserialization RCE in Puppet's report-processing code, now in CISA's KEV catalog after reports of active exploitation.
ScreenConnectSCKit Keeps Targeting Unpatched ScreenConnect
ConnectWise warns that SCKit attacks continue against unpatched ScreenConnect systems with identified third-party extensions still enabled.
Latest on the Wire
Full wire →- C++26 Technical Work Completed Again After Contracts ObjectionsHacker News
- CISA Tracks Critical N-able and MONAI Label Flaws Under Active ExploitationThe Hacker News
- Claude AI Proves VP ≠ VNP Over Every FieldHacker News
- Datasette-Charts: AI-Built Plugin for Full-Dataset VisualizationSimon Willison
New signal daily · RSS
Stay in the loop
New writing delivered when it's ready. No schedule, no spam.