The straight 256-bit AVX solution (no pext) goes a bit faster out of memory:<p><pre><code>                 AVX... 0.013 (speed up: 1.80)
</code></pre>
And even better out of L1:<p><pre><code>  nate@skylake:~&#x2F;git&#x2F;WojciechMula-toys&#x2F;base64&#x2F;decode&#x2F;sse$ .&#x2F;speed
  input size: 8192
     improved scalar... 2.481
              scalar... 4.839 (speed up: 0.51)
                 SSE... 1.918 (speed up: 1.29)
          SSE &amp; BMI2... 1.668 (speed up: 1.49)
                 AVX... 1.127 (speed up: 2.20)
          AVX &amp; BMI2... 1.290 (speed up: 1.92)
</code></pre>
(Absolute times aren&#x27;t comparable between Mem and L1, just the ratios within each)