3 ms·
> I thought was a little underwhelming. I agree, but... > so it added some overhead to special case 0 even though 0 only takes one iteration through the loop
by barsonme 11y ago
> I thought was a little underwhelming.
I agree, but...
> so it added some overhead to special case 0 even though 0 only takes one iteration through the loop anyway, and the loop still required up to 64 iterations if you have the high bit set.
Didn't it simply replace the body of `size_t popcnt(uint64_t x)` with the `popcnt` instruction? Or am I looking at the wrong test?