Computer Chess Club Archives


Search

Terms

Messages

Subject: Questions about branch predictions.

Author: Gerd Isenberg

Date: 15:15:04 08/08/03

Go up one level in this thread


I'm not quite sure about the branch prediction issue in Vincent's inner loops.
E.g. the "if ( color[u] == xside )" expression.

I learned that there are two kinds of branch predictions. Static and dynamic.
Static is done, if no BPT-entry is found, by simple heuristics like branching
short backward by jxx to a do-while body, but no jxx-branch foreward.

I guess dynamic branch prediction is implemented by a branch prediction table.
It maps ip of branch instruction with ip of branchtarget done recently with some
recent counter. Is that correct so far?

Does a frequently asked, but long time constant condition affects branch
prediction in seldom reached code with the same well known and often computed
condition but ip and branch target not in BPT?

How does the pipe length interact with branch prediction, eg. on P4, K7 or
Opteron?  Eg. if a condition is already computed and flags are set, but the
conditional jump is not even decoded, due to some further not modifying flag
instructions?

Thanks in advance,
Gerd



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.