User: Password:
|
|
Subscribe / Log in / New account

The problem with branch prediction

The problem with branch prediction

Posted May 29, 2011 21:50 UTC (Sun) by giraffedata (subscriber, #1954)
In reply to: The problem with branch prediction by davecb
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?


(Log in to post comments)


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds