Row vs. Column: Measuring Locality with csperf
Why this lesson exists Locality is often taught as a theoretical concept: row‑major arrays are faster than column‑major ones because the CPU cache lines are contiguous.
- Benchmarks compiled with same optimization flags, JSON artifacts contain detailed metrics.
- Diffing JSON files generates CSV highlighting layout performance differences on specific machines.
