White RoomNEW

Sixteen Times The Traffic

a is a 4096 by 4096 array of 4-byte ints, so 64 MiB, far larger than the 8 MB L3. Lines are 64 bytes and the array is row-major.

/* A */                          /* B */
for (int i = 0; i < N; i++)      for (int j = 0; j < N; j++)
  for (int j = 0; j < N; j++)      for (int i = 0; i < N; i++)
    sum += a[i][j];                  sum += a[i][j];

Which statement is correct?