On 2025-01-18 Sam Russell wrote:
> IIRC we test values from 0-16 bytes in the unit test and the pclmul
> implementation doesn't get hit for smaller values?
Correct. lib/crc.c has
if (pclmul_enabled && len >= 16)
return crc32_update_no_xor_pclmul (crc, buf, len);
so the behavior with short inputs is irrelevant. I'm sorry for the
false alarm. Having
assert(len >= 16);
at the beginning of the pclmul function could have made it obvious but
that's not an excuse, I should have looked at crc.c too.
--
Lasse Collin