2 ms·
No compiler (MSVC, gcc, icc) outputs the "bts" instruction for operations like: bitfield[val / 32] = val % 32; which could implicitly perform the modulo. Using
by slededit 11y ago
No compiler (MSVC, gcc, icc) outputs the "bts" instruction for operations like:
bitfield[val / 32] = val % 32;
which could implicitly perform the modulo.
Using the intrinsic provided significant performance improvements, and we got still more when the rest of the inner loop was rewritten purely in assembly.