By: anon (anon.delete@this.anon.com),
Room: Moderated Discussions
Eric Bron (eric.bron.delete@this.zvisuel.privatefortest.com) on April 11, 2013 12:30 pm wrote:
> > Your alternative of prefetching 1-2KB of data past the end of
>
> it's not my alternative, this is the common way to do it all the examples I have seen,
> including compiler generated code, I probably missed a lot of examples, though
You proposed prefetching past the end of array in this thread. I use "your" loosely, I do not mean you invented it.
>
>
> > the array does not sound preferable to ~2 branch misses.
>
> there is also the extra compare and well predicted branch for each prefetch instruction
> (it's more effective to mix regular code in between prefetch instructions) at each loop iteration
If it is stalling on memory for any amount of cycles, that should be pretty much irrelevant. If it is not, it should not need prefetching.
> > Your alternative of prefetching 1-2KB of data past the end of
>
> it's not my alternative, this is the common way to do it all the examples I have seen,
> including compiler generated code, I probably missed a lot of examples, though
You proposed prefetching past the end of array in this thread. I use "your" loosely, I do not mean you invented it.
>
>
> > the array does not sound preferable to ~2 branch misses.
>
> there is also the extra compare and well predicted branch for each prefetch instruction
> (it's more effective to mix regular code in between prefetch instructions) at each loop iteration
If it is stalling on memory for any amount of cycles, that should be pretty much irrelevant. If it is not, it should not need prefetching.


