Tag
Notes tagged “performance”
Every note filed under performance, newest first.
A filtered view of the notes.
2026
- The Widest Box Is the Bug
A flamegraph turns thousands of stack samples into one picture where the slow code is, almost literally, the biggest thing on the screen.
- With the Grain
The original turned a big integer into bytes one byte at a time, fighting the machine. The rewrite went with its grain — whole machine words, packed in C. That structural choice is why it's still ~15× faster fifteen years on, even as CPython sped up underneath it.
- The Grain of the Machine
A processor isn't a featureless calculator — it has a shape: words, cache lines, vector lanes. Code that moves with that grain runs many times faster than code that fights it, on the very same data. Here's the shape, and a measured case where the same arithmetic runs 22× slower against it.
2009
- Even faster String.prototype.trim() implementation in JavaScript
A faster, non-regex String.prototype.trim() — later adopted into early JS frameworks.
- Making the browser download scripts in parallel
Loading multiple scripts concurrently instead of the browser’s serial default.