Encyclopedia > Branch prediction

  Article Content

Branch prediction

Branch prediction is a technique used in some computer processors with instruction prefetch[?] to guess whether a conditional branch[?] will be taken or not and prefetch code from the appropriate location.

When a branch instruction is executed, its address and that of the next instruction executed (the chosen destination of the branch) are stored in the Branch Target Buffer[?]. This information is used to predict which way the instruction will branch the next time it is executed so that instruction prefetch can continue. When the prediction is correct (and it is over 90% of the time), executing a branch does not cause a pipeline break.

Some later CPUs simply prefetch both paths instead of trying to predict which way the branch will go.

An extension of the idea of branch prediction is speculative execution[?]. See also lazy evaluation, eager evaluation.

Not to be confused with branch predication.


This article (or an earlier version of it) contains material from FOLDOC, used with permission.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Shinnecock Hills, New York

... 0.97% Native American, 0.97% Asian, 0.00% Pacific Islander, 2.17% from other races, and 1.66% from two or more races. 10.41% of the population are Hispanic or Latino of any ...

 
 
 
This page was created in 59.6 ms