Hacker News new | ask | show | jobs
by averne_ 1324 days ago
You can just use __builtin_popcount or equivalent, which maps to a single instruction on most platforms.