c - Is it possible to tell the branch predictor how likely it is to follow the branch? -


Just to make it clear, I'm not going here for any kind of portability, so there is a solution that ties me A fixed box will be fine.

Actually, I have a statement that will evaluate 99% of the time truth, and trying to get every last clock of the display, can I release some types of compiler

/ Div> = "text">

Yes

__ builtin_expect is a way that the controller for GCC (version> = 2. 9 6) programmer Branch prediction provides information to indicate. The return value of __ builtin_expect is the first argument (which can only be an integer) passed to it.

  if (__builtin_expect (x, 0)) Foo (); [This] will indicate that we do not expect to call 'Foo' because we hope 'X' should be zero.