This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: [cygnus.project.sid] branch probability hinting


> From: Andrew Haley [mailto:aph@redhat.com]
> Also please everyone note that the compiler already knows that
> 
>    if (p == NULL)
> 
> is unlikely, so let's not obfuscate our code unnecessarily.
> 
Presumably it will take a hint that it's likely, e.g. when scanning a sparse
chained hash table?

How do you tell gcc that the branch probability is around 50-50 if it
already believes otherwise?  (E.g. half the child pointers in a binary tree
are NULL.)

Hans


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]