Computer Science / Unit 5 CS 0261 short lesson, about 20 seconds
Locality
Captions available
The idea
A processor repeatedly visiting the same memory locales has locality — spatial when access runs consecutively, temporal when data or instructions are reused — and it buys speed.
In practice
Two lists added front to back, and a loop rerun thousands of times, exercise both kinds.
Where people slip
Locality is written into code, not granted by it.
Your place on the trail
Every lesson rests on earlier ones and opens later ones. Tap any to jump.
Builds on
Something wrong in this lesson? Flag it · Sources for Computer Science