>From here <https://groups.google.com/forum/#!topic/mechanical-sympathy/pMN6TbXwOUc> I know Intel implemented several static branch prediction mechanisms these years:
- 80486 age: Always-not-taken - Pentium4 age: Backwards Taken/Forwards Not-Taken - Newer CPUs like Ivy Bridge, Haswell have become increasingly intangible, see Matt G's experiment here <https://xania.org/201602/bpu-part-two>. And Intel seems don't want to talk about it any more, because the latest material I found within Intel Document was written about ten years ago. I know static branch prediction is (far?) less important than dynamic, but in quite a few situations, CPU will be completely lost and programmers(with compiler) are usually the best guide. Of course these situations are usually not performance bottleneck, because once a branch is frequently executed, the dynamic predictor will capture it. Since Intel no longer clearly statements the dynamic prediction mechanism in its document, the builtin_expect() of GCC can do nothing more than removing the unlikely branch from hot path. I am not familiar with CPU design and I don't know what exactly mechanism Intel use nowadays for its static predictor, but I still feel the best mechanism for Intel should be to clearly document his CPU 'where I plan to go when dynamic predictor failed, forward or backward', because usually the programmer is the best guide at that time. -- You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
