I&#x27;d forgotten that these exist, but I&#x27;m not sure they are going to help here.  You save something doing 2 ranges at once, but Agner says each pcmpistrm takes 3 µops that must be on P0, while the pcmpgtb can go on P01, and the pand goes on P015.   Certainly worth trying, though.<p>My instinct was that switching to AVX2 was going to be a big win, but doesn&#x27;t help as much as I hoped.  Part of this is that we&#x27;re coming reading and writing to memory (that is, it gets faster if I make the buffers fit in L1) but still not astounding.  Not sure what the limiting factor is.<p>Here&#x27;s what I see on Skylake i7-6700 3.40GHz:<p><pre><code>  nate@skylake:~&#x2F;git&#x2F;WojciechMula-toys&#x2F;base64&#x2F;decode&#x2F;sse$ .&#x2F;speed
  input size: 67108864
     improved scalar... 0.024
              scalar... 0.041 (speed up: 0.59)
                 SSE... 0.018 (speed up: 1.30)
          SSE &amp; BMI2... 0.016 (speed up: 1.47)
          AVX &amp; BMI2... 0.015 (speed up: 1.63)</code></pre>