This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: [cygnus.project.sid] branch probability hinting
- To: "'Andrew Haley'" <aph at redhat dot com>, tromey at redhat dot com
- Subject: RE: [cygnus.project.sid] branch probability hinting
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Thu, 1 Mar 2001 09:05:44 -0800
- Cc: Java Discuss List <java at gcc dot gnu dot org>
> 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