logoalt Hacker News

jcalvinowenstoday at 5:14 PM0 repliesview on HN

Check out [1]: it has the most thorough description of branch prediction I've ever seen (chapter 3), across a lot of historical and current CPUs. It is mostly empirical, so you do have to take it with a grain of salt sometimes (the author acknowledges this).

Supposedly the branch prediction on modern AMD CPUs is far more sophisticated, based on [2] (a citation pulled from [1]).

[1] https://www.agner.org/optimize/microarchitecture.pdf

[2] https://www.cs.utexas.edu/%7Elin/papers/hpca01.pdf