← Back to systems
Branch Prediction And The Last Iteration Problem
6 questions · ~5 min · intermediate
Six questions on how branch predictors work, why the last iteration of a loop is structurally mispredicted, and how modern designs like TAGE and loop predictors try to compensate.
0 / 6
A for loop runs exactly 1000 iterations on every call. The branch predictor uses a 2-bit saturating counter. How many mispredictions occur per call once the predictor is warmed up?
Press 1 to 4 to pick an answer