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

Any code that does divisions and modulos with non-constants that are known to be powers of 2 should do the optimization manually.

Even for non-powers-of-two there are also techniques to speed up divisions if the same divisor is used repeatedly.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: