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

Any top-tier C compiler will optimize modular division by a constant into a more efficient operation(s). It is better to keep the intent of the code clear rather than devolve it into increasingly obtuse bit-twiddling tricks the compiler can figure out on its own.


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

Search: