From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Anton Blanchard <anton@samba.org>
Cc: David Schwartz <davids@webmaster.com>, linux-kernel@vger.kernel.org
Subject: Re: likely/unlikely
Date: Wed, 16 Jan 2002 04:12:16 -0500 [thread overview]
Message-ID: <3C4543F0.29CCD025@mandrakesoft.com> (raw)
In-Reply-To: <3C450C4A.8A8382A6@mandrakesoft.com> <20020116060014.GB24266@krispykreme>
Anton Blanchard wrote:
>
>
> > likely/unlikely set the branch prediction values to 99% or 1%
> > respectively. If this causes the code generated to perform less
> > optimally than without, I'm sure the gcc guys would be -very- interested
> > to hear that...
>
> On some ppc64 the branch prediction is quite good and static prediction
> will override the dynamic prediction. I think we avoid predicting a
> branch unless we are quite sure (95%/5%).
>
> So if likely/unlikely is overused (on more marginal conditionals) then
> it could be a performance loss.
oh agreed... but marginal conditionals should not be getting
likely()/unlikely() as you are then lying to the compiler about the true
branch predictability...
Jeff
--
Jeff Garzik | Alternate titles for LOTR:
Building 1024 | Fast Times at Uruk-Hai
MandrakeSoft | The Took, the Elf, His Daughter and Her Lover
| Samwise Gamgee: International Hobbit of Mystery
next prev parent reply other threads:[~2002-01-16 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-16 3:22 likely/unlikely David Schwartz
2002-01-16 5:14 ` likely/unlikely Jeff Garzik
2002-01-16 6:00 ` likely/unlikely Anton Blanchard
2002-01-16 9:12 ` Jeff Garzik [this message]
2002-01-16 6:32 ` likely/unlikely Craig Christophel
2002-01-16 7:38 ` likely/unlikely Adrian Bunk
2002-01-16 9:14 ` likely/unlikely Jeff Garzik
2002-01-16 9:29 ` likely/unlikely Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C4543F0.29CCD025@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=anton@samba.org \
--cc=davids@webmaster.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox