2 ms·
If I'm not mistaken some bit-hacking optimization could be done for the LCG variant. `X % 2^Y` can be re-written as `X & (2^Y-1)` . It seems GCC does not benefi
by Koffiepoeder 5y ago
If I'm not mistaken some bit-hacking optimization could be done for the LCG variant. `X % 2^Y` can be re-written as `X & (2^Y-1)` . It seems GCC does not benefit from this optimization (it uses 32-bit truncation), but Clang does.