Next: Two-bit branch prediction
Up: Control Hazards, Branch Prediction
 Previous: Performance of 1-bit prediction
Q:
- 	Suppose the loop is executed 9 times
 - 	Branch is taken 9 times, not taken once
 - 	What is the prediction accuracy, assuming 
	the prediction bit for the branch remains 
	in the prediction buffer?
 
A:
- 	Will inevitably mispredict on 10
iteration
 - 	Will also mispredict on first
 - 	Because prediction bit was flipped on previous
	execution of the loop's last iteration
	
- 	Branch is taken 90% of the time
 - 	But correctly predicted only 80% of the
		time
	
 
 
How can we do better?