सभी किताबें

पेशेवर

ऐप्स परिचय Coach लॉग इन पढ़ना शुरू करें

Quantitative Finance · शब्दावली

Branch prediction, branch misprediction क्या है?

अन्य नाम: branch prediction · branch misprediction

Definition 2.5 Low-Latency Software · अध्याय 2 — CPU Microarchitecture

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.

The loop of the 2012 question (sum the elements 128 of 32 768 random bytes) with a branch and with a mask, on sorted and shuffled data. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, pinned to one CPU, best of 30 runs. Data: bench_cpu.py.
Figure 2.3. The loop of the 2012 question (sum the elements ≥128\ge 128 of 32 768 random bytes) with a branch and with a mask, on sorted and shuffled data. Measured on a laptop (Intel Core Ultra 7 155H) under WSL2, no isolated cores, pinned to one CPU, best of 30 runs. Data: bench_cpu.py.
अध्याय में पढ़ें →