https://ridiculousfish.com/blog/posts/labor-of-division-epis...
https://ridiculousfish.com/blog/posts/labor-of-division-epis...
And it's faster if and only if you're repeating division by a single number since you're still doing the equivalent of divide to get the invest (but repeated division is actually quite common so this is useful).
This is done at compile-time by the compiler. We're talking about division by a constant, not by a variable. So it's always faster.
However there are other ways the trick can be used. If the compiler (or the programmer) determines that the program will be doing repeated division by a single quantity (say in a loop), you substitution a calculation of the multiplicative inverse of the quantity first and then substitute multiplication by that inverse for the repeated for the divisions. So you can extend things beyond just division by a constant.
Of course, the multiply is fully pipelined while the division is only partially, but even that leaves only a 10-fold difference.
Division is much faster these days than it used to be. It's still worth it to have compiler optimizations for it, but it's not important to avoid it anymore.
> only a 10-fold difference.
A ten fold difference is literally one order of magnitude. Which is what the post you're replying to factually stated.
Even still people (unfortunately) use "orders of magnitude" like "exponential growth", signifying something like "wow, a lot, but no idea how much".
I hate it, too, when people call a quadratic curve "exponential".
Interestingly, the ARM11 in original RPi and RPi0 doesn't have hardware integer division (despite being 10x faster than typical M4 and typically having 10000x RAM), but it does have floating point division.