On Thu, Apr 18, 2013 at 8:05 PM, Florian Pflug <f...@phlo.org> wrote: > On Apr18, 2013, at 19:04 , Jeff Davis <pg...@j-davis.com> wrote: >> On Wed, 2013-04-17 at 20:21 -0400, Greg Smith wrote: >>> -Original checksum feature used Fletcher checksums. Its main problems, >>> to quote wikipedia, include that it "cannot distinguish between blocks >>> of all 0 bits and blocks of all 1 bits". >> >> That is fairly easy to fix by using a different modulus: 251 vs 255. > > At the expense of a drastic performance hit though, no? Modulus operations > aren't exactly cheap.
The modulus can be done in the end. By using a modulus of 65521 the resulting checksum is called Adler-32. [1] However the quality of Fletcher-32/Adler-32 is strictly worse than even the first iteration of multiply-add based checksums proposed. [1] http://en.wikipedia.org/wiki/Adler-32 Regards, Ants Aasma -- Cybertec Schönig & Schönig GmbH Gröhrmühlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers