Spatial Locality: Array Processing's Speed Secret

Spatial locality, the tendency to access nearby memory locations soon after one another, is critical for achieving significant speedups in array and matrix operations. Modern CPUs exploit this by fetching entire cache lines (typically 64 bytes) from memory, meaning accessing one element brings its neighbors into the fast cache for 'free'.

Sources

Open the full topic