A program repeatedly accesses a 2D array column-by-column instead of row-by-row in a row-major language like C. What is the primary performance cost?
-
A
Stack overflow from deep recursion
-
B
Increased instruction count from extra loops
-
C
Higher register pressure in the CPU
-
D
Poor cache locality causing frequent cache misses