How global history register size affects branch prediction accuracy
This medium-difficulty computer architecture question tests your understanding of how global branch predictor design choices impact prediction accuracy in real code. It requires you to reason about the trade-off between history depth and state space in branch prediction hardware.
To approach this problem, you need to trace through the branch execution sequence, understand how the global history register records recent branch outcomes, and predict how different GHR widths will affect which predictor states are visited. The key insight is recognizing that a longer history captures more contextual information about branch behavior, but also that aliasing, initialization state, and the specific branch pattern all shape which design performs better on the given code.
- Global history register (GHR) and prediction table indexing
- Saturation counter state transitions and initialization
- Branch correlation and pattern recognition in predictors
- Accuracy trade-offs with increased hardware state