4 ms·
Multiplication is reasonably common. Once you have multiplication by a constant you get division by a constant for free, so that leaves division by a variable.
by marcan_42 6y ago
Multiplication is reasonably common. Once you have multiplication by a constant you get division by a constant for free, so that leaves division by a variable. That is a very rare operation in non-mathy code, and usually for math you'd end up with floating point division anyway which is a whole different ball game (good code anyway; people writing for modern CPUs will of course throw integer division and modulo around without second thought, but the vast majority of the time you can avoid those operations and run faster).