Comment by bobmcnamara
12 hours ago
Many compiles will compute div-by-a-constant using the invert, multiply, and shift off the remainder trick. Once you have that, you can do mod-by-a-constant as a derivative and usually still beat 1-bit or 2-bit division.
No comments yet
Contribute on Hacker News ↗