No compiler (MSVC, gcc, icc) outputs the &quot;bts&quot; instruction for operations like:
bitfield[val &#x2F; 32] = val % 32;
which could implicitly perform the modulo.<p>Using the intrinsic provided significant performance improvements, and we got still more when the rest of the inner loop was rewritten purely in assembly.