AlgoPlus//structures / memory-hierarchy
Read the theory

Memory Hierarchy

Faster, smaller, costlier at the top; an access climbs down until it hits, then data is pulled up.

Accessing
Latency
Legend
Probing
Hit
Latency
AI Tutor Workspace
In a nutshell
No single memory is fast, large, and cheap all at once, so computers stack several kinds in layers: a few tiny, lightning-fast registers on top, then caches, then main memory (RAM), and finally disk at the bottom — each step down is slower and bigger but cheaper per byte. A request checks the fastest level first and works down until it finds the data, then copies it upward so the next use is quick. This works because of locality: programs tend to reuse the same and nearby data.
Ready
Press play to begin the cinematic walkthrough.
No memory is fast, big, and cheap at once, so machines stack levels: tiny fast registers over caches over RAM over disk. An access climbs down until it hits, then the block is pulled up — locality makes the average near register speed.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Memory Hierarchy.