This exercise examines the accuracy of branch predictors for
This exercise examines the accuracy of branch predictors for the following repeating pattern of branch outcomes: T, T, T, NT, T Suppose the pattern repeats for many times, the initial state of the predictor does not affect the accuracy much. What is the accuracy of always-taken predictor? What is the accuracy of always-not-taken predictor? What is the accuracy of a single-bit predictor? What is the accuracy of a two-bit predictor?
Solution
a) always taken = 4/5 = 0.8 = 80%
d) always not taken = 1/4 = 0.25 = 25%
c) approximately 80%
