The performance of branch prediction depends on the prediction accuracy and the cost of misprediction.
Misprediction penalty depends on many organizational features:
- the pipeline length (favoring shorter pipelines over longer pipelines),
- the overall organization of the pipeline,
- the fact if misspeculated instructions can be removed from internal buffers, or have to be executed and can only be removed in the retire stage,
- the number of speculative instructions in the instruction window or the reorder buffer. Typically only a limited number of instructions can be removed each cycle.
Mispredicted is expensive:
- 4 to 9 cycles in the Alpha 21264,
- 11 or more cycles in the Pentium II.