From: Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
To: Andreas Schwab <schwab@suse.de>
Cc: Andi Kleen <ak@suse.de>, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: Linux 2.4.10-pre11 -- __builtin_expect
Date: Tue, 18 Sep 2001 16:11:06 -0400 [thread overview]
Message-ID: <200109182011.f8IKB6PP026916@sleipnir.valparaiso.cl> (raw)
In-Reply-To: Message from Andreas Schwab <schwab@suse.de> of "18 Sep 2001 13:13:48 +0200." <jeelp4rbtf.fsf@sykes.suse.de>
Andreas Schwab <schwab@suse.de> said:
> Andi Kleen <ak@suse.de> writes:
> |> +#define likely(x) __builtin_expect((x), !0)
>
> IMHO, this should better be written as
>
> #define likely(x) __builtin_expect(!!(x), 1)
>
> because x is not required to be pure boolean, so any nonzero value of x is
> as likely as 1.
I don't think you are really thinking "likely", you are thinking "must_be"
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Vin~a del Mar, Chile +56 32 672616
prev parent reply other threads:[~2001-09-18 20:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010918031813.57E1062ABC@oscar.casa.dyndns.org.suse.lists.linux.kernel>
[not found] ` <E15jBLy-0008UF-00@the-village.bc.nu.suse.lists.linux.kernel>
[not found] ` <9o6j9l$461$1@cesium.transmeta.com.suse.lists.linux.kernel>
2001-09-18 10:44 ` Andi Kleen
2001-09-18 11:13 ` Andreas Schwab
2001-09-18 12:38 ` Andi Kleen
2001-09-26 23:54 ` James Antill
2001-09-27 12:51 ` Andreas Schwab
2001-09-27 15:41 ` James Antill
2001-09-27 16:28 ` Andreas Schwab
2001-10-04 18:52 ` Richard Henderson
2001-10-08 6:17 ` James Antill
2001-09-18 20:11 ` Horst von Brand [this message]
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=200109182011.f8IKB6PP026916@sleipnir.valparaiso.cl \
--to=vonbrand@sleipnir.valparaiso.cl \
--cc=ak@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®