[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A490D00.4020908@zytor.com>
Date: Mon, 29 Jun 2009 11:50:40 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Petr Tesarik <ptesarik@...e.cz>
CC: "Robert P. J. Day" <rpjday@...shcourse.ca>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH] Introduce a boolean "single_bit_set" function.
Petr Tesarik wrote:
>
> Ok, then my only concern is that the hweight* functions return the exact
> weight, which might be much less efficient if all we need is to know
> whether it's 1.
>
> Theoretically, gcc should be able to optimize things out, but I'm not
> all that optimistic about how well it does it.
>
I can almost guarantee it won't in this case.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists