Your backtester stores a matrix of 1000 stocks across 100,000 timestamps. You wrote a loop to calculate the daily cross-sectional return, but it's terribly slow. Memory profiling shows a 90% cache miss rate. What is the root cause and how do you redesign the memory layout?