- Published on
Investigation · Part 15 of 20 · When the benchmark lies
Does Code Alignment Change the Speed of the Same Code?
I placed the same 11-instruction loop at all 64 positions of a cache line, two copies each, and measured them in shuffled order. At one position the loop was 16 to 21 percent slower, in three runs out of three. The same bytes, a different address, a different speed.