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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -