logoalt Hacker News

grumbelbart2today at 5:37 AM0 repliesview on HN

There is a static branch predictor that is used if there is no statistic on a branching instruction yet, and it's really simple: Jumps backward are assumed to be taken (they usually are from a loop), jumps forward are assumed to be not taken.

So the jump that forms the loop will be predicted correctly for all executions but the very last (when the loop ends).