What is the main advantage of a 2-bit saturating counter branch predictor over a 1-bit predictor?
Correct answer D. A loop branch that is mispredicted once on loop exit does not change the prediction for the next entry
A 2-bit counter must be wrong twice in a row before its prediction flips. For a loop branch that is taken many times and not taken once at exit, a 1-bit predictor mispredicts twice per loop visit (exit and re-entry), while a 2-bit counter mispredicts only once. No dynamic predictor is perfect, and the target buffer is still needed to supply target addresses.
Answer checked How we write and check questions
Discussion