Answer from cs61c-ck (Allen Lee 16583554) for Question 2 The array x[][] is two dimensional, but memory is one dimensional, so when the array is translated into memory, we lay the rows of the array out in a line. For example, a 3x3 2d array such as abc def ghi would look like ...abcdefghi... in memory (rows are grouped together). Thus, it is better to do array accesses by row because of spatial locality (the rows are closer together in memory). In the optimized loop, our array accesses were linear in memory, but before, it jumped back and forth. Since our cache is small and we load several words at the same time, the second for-loop has better access time.