Spring 2026

Branch Prediction: TAGE and Perceptron Predictors on SPEC

A project that took TAGE and perceptron predictors as starting points, designed six variants on top of them, and measured all of it against SPEC benchmarks as Intel Pin tools.

  • systems
  • data

Outcome

Branch predictors measured over real program execution rather than traces. Baseline TAGE reaches 99.93% accuracy on libquantum and tops out at 96.5% on dealii, and the parameter sweeps show which settings do the work: table count accounts for nearly all of it, while global history past 40 bits adds close to nothing on either benchmark. The team then designed six variants of its own, four on TAGE and two on the perceptron predictor, and measured them the same way. No single design won outright. Which predictor came out ahead depended on the benchmark, which is the same pattern the parameter sweeps show at a smaller scale: the workload decides what is worth paying for.

A four-person project, worked on collectively rather than split by part.

Every table offers an opinion; the one that matched on the most history is believed. The base table is what answers when nothing matches.Five stacked tables: a base table indexed by the program counter alone, and four tagged tables reading 5, 15, 40 and 80 bits of global history. A branch arrives and two tagged tables match; the one reading 40 bits wins because its history is longer. A second branch matches none of them, and the base table supplies the prediction instead.

Motivation

Most modern branch predictors descend from TAGE. It clearly works, so the question worth answering is which of its knobs pay for themselves, given that every extra table and history bit costs silicon, and whether a variant can do better than the shape everyone already uses.

Experience, learning & skills

  • Designed six original predictor variants: adaptive history length selection, alternative replacement policies, a confidence predictor, a history-overfit predictor, and two PC-bias designs
  • Extended the same treatment to perceptron predictors with confidence-gated global history, a confidence update rule, and dynamic threshold designs
  • Built the predictors as Intel Pin tools, so accuracy is measured against real instruction streams rather than a trace file
  • Ran the benchmark matrix on a compute cluster through SLURM batch jobs
Line chart of prediction accuracy against number of tables on the libquantum benchmark, for global history lengths of 40, 60 and 80 bits. Accuracy rises from 0.980 at four tables to about 0.999 at six, then flattens through eight.

libquantum: the sixth table is where the returns stop. The three history lengths are nearly indistinguishable.

Line chart of prediction accuracy against global history bits on the dealii benchmark, for four, six and eight tables. Each line is nearly flat across 40 to 80 bits, but the lines are clearly separated by table count, from 0.944 to 0.965.

dealii: the lines are flat but clearly separated. History length barely matters here. Table count is what moves the number.

Technical details

Each tagged table entry holds a prediction counter, a tag, and a 2-bit saturating useful counter. A table is indexed by XOR-folding the branch PC against a slice of the global history register, with each table taking a longer slice than the last; the prediction comes from the hit table using the longest history, falling back to the base table when nothing hits. On a misprediction the predictor allocates into a table with longer history, preferring entries whose useful counter has decayed to zero, and at most one entry is allocated per misprediction.

On libquantum, accuracy climbs from 98.0% to 99.9% between four and six tables and then flattens out, so the eighth table costs silicon and returns almost nothing. On dealii the curve is lower and differently shaped: table count still matters, moving 94.4% to 96.5%, but history length is almost flat across 40, 60, and 80 bits. The two benchmarks gave different answers about which knob is worth paying for.