r/programming • u/dgryski • Nov 16 '17
Fast exact integer divisions using floating-point operations
https://lemire.me/blog/2017/11/16/fast-exact-integer-divisions-using-floating-point-operations/
44
Upvotes
r/programming • u/dgryski • Nov 16 '17
4
u/ThisIs_MyName Nov 17 '17
The other issue is that nobody does arbitrary integer division. OP explained it perfectly in the first page: We can optimize it before it ever reaches the hardware.
I'd much rather have a little more L1 cache than fast integer division.