Branch prediction is the core’s guess, made at fetch, of the direction and target of each branch, so that the pipeline can keep fetching before the branch is executed. A branch misprediction is a wrong guess: the core discards every instruction fetched after the branch and refetches from the right target, losing the depth of the front of the pipeline in cycles.
bench_cpu.py.