Example
Determine the total branch penaltyfor branch target buffer assuming the penalty cycles for mispredictions as in Fig.4.24:. Assume prediction accuracy 90% and hit rate 90%, branch frequency 60%.
branch penalty = penalty due (hit but not taken + miss but taken)
= Percent Hit * Incorrect Prediction * 2 + Percent Miss * Taken Branches * 2
= (90 * 10 * 2 + 10 * 60 * 2 )/ 100 = 0.18 + 0.12 = 0.30.
Meaning: every branch incurs .30 cycles more time on a average. (compare this to dealyed branch : 0.50)