From Branches to Vectors: When Your CPU Stops Guessing and Starts Computing

Your CPU predicts the future. Every time your code hits an if, the processor guesses which way it goes and starts executing that path before the condition is evaluated. When the guess is right, you pay nothing. When it is wrong, the pipeline flushes and restarts. Fifteen to twenty wasted cycles. For most branches, the predictor gets it right over 95% of the time. But some branches resist prediction. Those are the ones worth eliminating — and eliminating them opens a door to something bigger. ...

March 26, 2026 · 10 min · Gracjan Olbinski

The 64-Byte Grid Your Data Lives On

You write a struct with three fields. A char, a double, another char. Ten bytes of data. sizeof returns 24. Fourteen bytes appeared out of nowhere. To understand where they came from, you need to see the grid your data lives on — and the two opposing forces that grid creates. Cache lines and the hardware grid Your memory is not a flat sea of bytes. The hardware divides it into 64-byte blocks called cache lines. ...

March 20, 2026 · 9 min · Gracjan Olbinski

Test Names That Enforce Architecture

You have a test suite. One feature breaks. Forty tests go red. Not because forty things are wrong — because forty tests each validated the same contract they do not own. This happens more often than most teams admit. A session management change breaks connection pool tests. A database schema migration fails authentication tests. Every test that ever touched a shared precondition lights up, and you spend the first twenty minutes of debugging just figuring out what actually broke. ...

March 17, 2026 · 8 min · Gracjan Olbinski