Hi, On 2024-12-12 18:32:20 +0700, John Naylor wrote: > I went and looked at the Chromium source, and found the following > snippet that uses the same technique, but only requires 128-bit CLMUL > and has a minimum input size of 64 bytes, rather than 256. This seems > like it might be better suited for shorter inputs. Also seems much > easier than trying to get the AVX-512 hippo to dance. It uses the IEEE > polynomial, so would need new constants calculated for ours, but that > had to be done for the shared patch, too.
Frankly, we should just move away from using CRCs. They're good for cases where short runs of bit flips are much more likely than other kinds of errors and where the amount of data covered by them has a low upper bound. That's not at all the case for WAL records. It'd not matter too much if CRCs were cheap to compute - but they aren't. We should instead move to some more generic hashing algorithm, decent ones are much faster. Greetings, Andres