3 ms·
It's not necessary since the set of possible divisors is known in advance. Also, "multiplying by the reciprocal" is a bit simplistic - there's some other instr
by WalterBright 13y ago
It's not necessary since the set of possible divisors is known in advance.
Also, "multiplying by the reciprocal" is a bit simplistic - there's some other instructions added in based on the specific divisor value. Adding more tests and branches for these likely would not pay off.
- jongraehl 13y agoYeah, I looked up the method and agree that if most of your tables are small, it's worth those simple ifs. I only meant to store it in addition because the alternative, storing an index into the list of divisors (and thus reciprocals) might be slower due to an extra indirection.