Memory Bank Conflict

int matrix[31250][2048];
for (int i = 0; i < 31250; ++i)
  for (int j = 0; j < 2048; ++j)
    sum += matrix[i][j];
^ This is Faster?
int matrix[31250][2048];
for (int j = 0; j < 2048; ++j)
  for (int i = 0; i < 31250; ++i)
    sum += matrix[i][j];
^ This is Faster?

* The benchmark is run under AMD Ryzen 9.

* For the full benchmark code, please refer here.

* For illustration purposes only, see FAQ for more details.