Index

How Computers Work · Memory hierarchy: locality

The memory hierarchy

Two loops read the same million numbers, the same number of times. Why does one take thirty times longer?

The same array, the same count of reads, and only the order they happen in changes. The panels trace the first twelve reads, show which level of memory answered them, and price the whole loop in cycles per read. Walking in a straight line keeps the bill small, and chasing scattered pointers multiplies it by tens.

Board: The Memory Hierarchy →

On a narrow screen the three panels stack. The slider and the pattern tabs stay above them.

try this Pick Following a chain of pointers, drag Memory the loop walks from end to end, and watch The bill jump.

Included with a plan

This lab is included with a plan. The first three lessons of every track are free, with their boards and videos. A plan unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

see also The Log-Structured Merge-Tree (LSM-Tree) in Papers.