Glossary

Branch target buffer (BTB)

Beginner

A list that remembers where each jump in a program went last time, so the processor can follow it before it has even read the jump.

Novice

A small cache that maps the address of a branch instruction to where it jumped last time. Fetch looks it up every cycle, so it can follow a taken branch before the instruction is even decoded.

Expert

Tagged by fetch address and consulted in the first fetch stage; modern cores use multi-level BTBs with thousands of entries. Indirect branches need their own predictors, and returns use a return address stack.