3 ms·
The sibling comment talking about division _instructions_ is spot on. It's sort of like how you can use shifts and other bit twiddling to divide by small const
by hansvm 2y ago
The sibling comment talking about division _instructions_ is spot on.
It's sort of like how you can use shifts and other bit twiddling to divide by small constants (like 5) much more quickly than actually issuing a division instruction.
Or, to divide a float by an integer power of 2 you can just manually set the exponent bits correctly.