You're viewing a comment by Nathan Myers and its responses.

Nathan Myers Permalink
May 11, 2018, 05:11

You use the POPCNT instruction. Compilers have an intrinsic, __popcount(i). In C++, std::bitset

<32>

(i).count() compiles to a single POPCNT instruction.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "server_143": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.