Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How does help me use popcnt to find how many bit pairs are used and how many are empty? Edit: whoops, I gotcha.

I'll profile this.

Edit 2: no I won't profile it, because I don't have the instruction. Damn.



You don't need to have POPCNT to implement much faster bit counting:

http://graphics.stanford.edu/~seander/bithacks.html#CountBit...




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

Search: