Hacker News new | past | comments | ask | show | jobs | submit login

Both clang and gcc have __builtin_popcnt variants.



But both will issue actual popcount instructions only if they have been assured the program will be run on a machine that implements the instruction, which is not the default on, in particular, amd64/x86_64.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: