Created
December 15, 2018 09:19
-
-
Save cyberkm/4477b20acb38418a37e12f3eb7c5c21c to your computer and use it in GitHub Desktop.
Population count algorithm hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x * 0x0101010101010101ull | |
is equal to (x + (x<<8) + (x<<16) + ... + (x<<56)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment