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

Your code has 6 shifts, 6 adds/subs and 6 ANDs.

You can do it with 4 shifts, 3 adds, 1 MUL and 4 ANDs.

Your code is simply suboptimal.




For a 64bit quantity? I'm curious to see your algorithm in actual code.




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

Search: