CPU cache.
Keeping the tools you reach for most in your apron pocket, not on the far shelf.
- 1
Speed tiers, by distance: pocket, near shelf, far shelf, the back storeroom.
- Got it.2
A tool already in the apron pocket is right there — that’s a cache hit.
- Hang on…3
Not in the pocket? Stop and walk to the far shelf — a miss, and a long wait.
- 4
So when it fetches one thing, it grabs the neighbours too, betting you’ll want them.
- 5
Work along a row in order and almost everything is already in reach — hit after hit.
- Again? Really?6
Jump around at random and you’re back to the far shelf every time — miss after miss.
Semicolony semicolony.dev/eli5/cpu-cache/comic