[cygnus.project.sid] branch probability hinting
Boehm, Hans
hans_boehm@hp.com
Thu Mar 1 09:06:00 GMT 2001
> 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
More information about the Java
mailing list