On 19 Oct 2014, at 13:02, Andriy Gapon <[email protected]> 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

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to