Re: [RFC][PATCH] Faster generic_fls

Andrew Morton (akpm@digeo.com)
Thu, 1 May 2003 17:54:50 -0700


Daniel Phillips <dphillips@sistina.com> wrote:
>
> On Friday 02 May 2003 02:10, Willy Tarreau wrote:
> > At first, I thought you had coded an FFS instead of an FLS. But I realized
> > it's valid, and is fast because one half of the numbers tested will not even
> > take one iteration.
>
> Aha, and duh. At 1 million iterations, my binary search clobbers the shift
> version by a factor of four. At 2**31 iterations, my version also wins, by
> 20%.
>

Would it be churlish to point out that the only significant user of fls()
is sctp_v6_addr_match_len()?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/