DEV Community

Cover image for From Heartbeats to Cache Misses: Making Big Numbers Hit Home
Christian Willner
Christian Willner

Posted on

From Heartbeats to Cache Misses: Making Big Numbers Hit Home

'Our local library has 1.7 million books.' 'Reading from RAM is 500k slower than the L1 cache.'

Simple facts, right? Easy to repeat in an argument but so much harder to convey their impact.

When my kids marveled at the sheer number of books in the big library behind the main station, I needed a reference they could relate to. So, I got creative: I took a stack of books and laid one down for every step we took along the hallway. Walking to the closest supermarket? That’s a full shelf. Visiting friends across town? The entire room cleared out. And if they traded a book for every step they took from spring to New Year’s, they’d empty the library.

Distances shape our daily lives, making them an accessible reference. But there’s an even stronger candidate: time.

In a memorable presentation, Aras Pranckevičius used the human heartbeat to explain data retrieval times, creating a framework that was impossible to forget. If accessing the processor's Level 1 Cache takes one heartbeat, reading from RAM takes as long as brushing your teeth. A trip to a fast SSD? That’s a whole weekend. And a return package via internet? That's the time it takes to earn a bachelor’s and a master’s degree.

Frameworks like these make facts stick. They anchor abstract numbers to relatable experiences, turning dry stats into memorable stories. My daughter, for example, has already marked the distance it will take her to read their tiny school library.

One step at a time.

[Cover photo source]

Top comments (0)