2 ms·
And with newer processors, the POPCNT instruction is your friend. You probably are aware, but on newer processors with AVX2, using SIMD to count bits can be al
by nkurz 11y ago
And with newer processors, the POPCNT instruction is your friend.
You probably are aware, but on newer processors with AVX2, using SIMD to count bits can be almost twice as fast as using builtin POPCNT. And if the move to AVX-512 ever happens, this advantage will probably grow. Wojciech has numbers here, although I think he may be slightly understating the advantage: http://wm.ite.pl/articles/sse-popcount.html http://wm.ite.pl/articles/sse-popcount.html
- dalke 11y agoYes. I saw that going around HN recently. I still have it open in a tab. But to me, that new hardware is still a dream.