Sixteen Iterations Ahead

A loop walks a scattered node list, one 64-byte node per iteration, so every iteration is a fresh cache line. Per-iteration compute is about 5 ns. A miss all the way to DRAM costs about 80 ns.

You add __builtin_prefetch(&node[i + D]) inside the loop. What should D be?

A

About 5 iterations

B

About 16 iterations

C

1 iteration

D

About 80 iterations