Question

I got a program that I know will run only on very specific hardware, so I started using crc32 as supplied by the SSE4.2 instruction set, but now I need crc16 for a different purpose. Is there a way to coax the hardware to give me crc16 with the same performance as SSE's crc32?

Thanks

Was it helpful?

Solution

If you have the PCLMULQDQ instruction, you can use that to make a fast CRC. Though not quite as fast as the crc32 instruction.

Alternatively, a poor man's check value could be the low 16 bits of the result of crc32.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top