4 ms·
Shouldn't a good compiler apply this type of optimisations?
by rkwasny 10y ago
Shouldn't a good compiler apply this type of optimisations?
- AstralStorm 10y agoIt generally does. (GCC, Clang and ICC) But it cannot simplify the operation on some architectures or when the factor is variable. The "fastrange" is a very different operation on prime factors than modulo.