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

> If you would like to experiment yourself, Compiler Explorer snippet can be found here

https://gcc.godbolt.org/z/qGzWo39b6

Which is an x86-64 sample




It's a little impossible to show the difference between using popcnt and the expanded emulation code on a platform that doesn't support popcnt.

It doesn't change the fact that the actual program itself was being complied on a platform that doesn't support popcnt, so no amount of compiler arguments would fix that.


NEON extension on ARM comes with CNT instruction that counts set bits.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: