On Mon, 17 Oct 2011 16:53:42 -0400, Manu <turkey...@gmail.com> wrote: [snip]
*Count leading/trailing zeroes:* I don't know of any even slightly recent architecture that doesn't have opcodes to count loading/trailing zeroes, although they do exist, so perhaps this is a little dubious. I'm sure this could be emulated for such architectures, but it might be unreasonably slow if used...
D has this: check out std.intrinsic's bsr and bsl.