Branch Prediction
Notes
- Static:
- Simple (easy): predict branch not taken.
- More complex:
- Forward branches not taken (loops )
- Backward branches take (loops)
- Dynamic
- 1 bit state machine
-
if (a%2 == 0)will break this. - Also, loops that are inside loops will break this.
-
- 2 bit state machine
- Can be as high as 93% correct.
- 1 bit state machine
- There are more schemes, but none seem particularly better.
- Apparently some people are experimenting with ANN predictors.