DRAM Refresh

// Pointer chasing, array fits in L1
int arr[1024];
for (int i = 0; i < N; ++i)
  idx = arr[idx];
^ This is Faster?
// Pointer chasing, array in DRAM
int arr[64'000'000];
for (int i = 0; i < N; ++i)
  idx = arr[idx];
^ 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.