4 ms·
Any code that does divisions and modulos with non-constants that are known to be powers of 2 should do the optimization manually. Even for non-powers-of-two th
by mgaunard 2y ago
Any code that does divisions and modulos with non-constants that are known to be powers of 2 should do the optimization manually.
Even for non-powers-of-two there are also techniques to speed up divisions if the same divisor is used repeatedly.