3 ms·
Did they ever figure out how to look at the value of a loop counter and use that to predict the branch?
by Dwedit 3y ago
Did they ever figure out how to look at the value of a loop counter and use that to predict the branch?
- Taniwha 3y agoessentially yes, except that on modern CPUs the fetch/decode stages (where the branch predictors live) are so far away (in space and time) from where the loop counters live that it's not practical to connect them directly - instead the front end maintains history bitmaps of recent branch activity (whether branches are taken or not) which in effect contain the history of how many times you've been around a loop