Faster CRC32-C on x86
In short: there are three 32-bit crc32 pipelines on modern Intel CPUs, but also a clmul (carry less multiplication) instruction in AVX on a separate pipeline.<p>clmul was designed as a more general crc32 accelerator for the SIMD instructions set. (It is sufficiently general to also do Reed Solomon and Elliptical Curves. ARM has an equivalent pmul instruction if you are curious).<p>The traditional methods are to either use crc32 instruction, or the CLMUL instruction.<p>This blog post uses both instructions for maximum speed. Modern processors can execute different pipelines in parallel. So by placing CLMUL and crc32 instructions next to each other, you get the parallel execution with high efficiency.<p>It is tricky to calculate crc32 in parallel using two different instructions &#x2F; methodologies interleaved. But this blog post accomplishes that.