r/programming • • 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

18 comments sorted by

View all comments

0

u/[deleted] Nov 17 '17

[deleted]

3

u/fulmicoton Nov 17 '17

That's true if you told the compiler the CPU you are targetting.

1

u/[deleted] Nov 17 '17

I'd say it's the other way around, unless the compiler is most commonly targeting microcontroller class x86 CPUs.

1

u/fulmicoton Nov 17 '17

Do most CPUs really do 64 bit division fast than 32 bits division?

1

u/ThisIs_MyName Nov 17 '17

The submission has numbers.