The problem with branch prediction
Posted May 29, 2011 21:50 UTC (Sun) by giraffedata
In reply to: The problem with branch prediction
Parent article: The problem with prefetch
Turns out most branches were around either short runs of legitimately conditional code or debug macros. In those cases it didn't matter if we set the prediction to correctly predict we'd branch around.
Why not? I can see there might not be any prefetching advantage because you're branching to something that is already in cache, but you can still do a lot of other execution of the instructions while still working on a prior one.
The branch was very often far enough we hit a different i-cache line. Since we didn't have a way of hinting what line we'd hit, ...
The line you'd hit is completely determined by the target in the branch instruction, isn't it?
to post comments)