svn commit: r273274 - head/sys/netpfil/ipfw

David Chisnall theraven at FreeBSD.org
Tue Oct 21 07:54:51 UTC 2014


On 19 Oct 2014, at 13:02, Andriy Gapon <avg at FreeBSD.org> wrote:

> I think that on platforms where an optimized version of fls() is available that
> would work faster than this cool piece of bit magic.

If you're lucky, the compiler's idiom recogniser will spot this.  You're generally better off using the builtins though, because then the compiler will expand them to something sensible (hopefully - old versions of gcc did horribly inefficient things for bswap and clz on platforms without native support).

David



More information about the svn-src-head mailing list