prediction - __builtin_expect from GCC with probability -
__builtin_expect
gcc can used programmer show variants expected , rare. __builtin_expect
have "true" , "false" (0% or 100% probability)
for big projects vary hard profile feedback (-fprofile-arcs
), , programmer know, probability of branch have in point of program.
it possible give hint compiler branch have probability >0% , <100% ?
true , false mean "the first variant more likely" , "the second variant more likely". there's no practical need values other these. compiler won't able use information.
Comments
Post a Comment