On 5/18/15 10:40 PM, Brian Schott wrote:
On Tuesday, 19 May 2015 at 05:16:48 UTC, Andrei Alexandrescu wrote:
Any ideas for faster code?

Unless I'm mistaken, any uint that's a power of 2 will only have a
single set bit, so why not use the "popcnt" instruction?
http://dlang.org/phobos/core_bitop.html#.popcnt

There are complaints it's not that fast, e.g. http://danluu.com/assembly-intrinsics/. -- Andrei

Reply via email to