Measuring the size of the cache line empirically
lemire.me
lemire.me
I think this should give a more staircase-y plot, with jumps when the size of each individual copy passes whole multiple of cache line width.
I think this way you don't need to fight prefetching, and there will be one read-modify-write per operation except right at the edges which is another signal.
To avoid prefetch (in the compiler or hardware level) for stride N shuffle the reads to make sure you read each cache line exactly onces. Then you'll hit TLB issues. To handle that either sort them within a fixed sized sliding window, or within the same page.
Then you should get MUCH cleaner graphs.
Btw on RISC-V you can find the cache line size directly using the `cbo.zero` instruction. Dunno about ARM/x86.