> This isn't a 64-bit CRC.  It's two independent 32-bit CRCs, one done
> on just the odd-numbered bytes and one on just the even-numbered bytes
> of the datastream.  That's hardly any stronger than a single 32-bit CRC;

I believe that the longer data the more chance to get same CRC/hash
for different data sets (if data length > CRC/hash length). Or am I wrong?
Having no crc64 implementation (see below) I decided to use 2 CRC32 instead
of one - it looked better, without any additional cost (record header is
8 byte aligned anyway, on, mmm, most platform).

> it's certainly not what I thought we had agreed to implement.

I've asked if anyone can send crc64 impl to me and got only one from
Nathan Myers. Unfortunately, SWISS-PROT impl assumes that long long
is 8 bytes - is it portable?

Vadim



Tue, 6 Mar 2001 23:40:13 -0800
"Vadim Mikheev" <vmikheev@sectorbase.com>
Re: Uh, this is *not* a 64-bit CRC ...
"Vadim Mikheev" <vmikheev@sectorbase.com> writes:
> I've asked if anyone can send crc64 impl to me and got only one from
> Nathan Myers. Unfortunately, SWISS-PROT impl assumes that long long
> is 8 bytes - is it portable?

No, it's not.  I have written an implementation that uses uint64 if
available (per configure results) otherwise a pair of uint32 registers.
(See pg_crc.h in as-yet-uncommitted patches I posted to pgpatches.)

Interestingly, gcc -O on HP-PA generates essentially the same code
sequence for either the 64- or dual-32-bit versions of the macro...

			regards, tom lane

Wed, 07 Mar 2001 10:34:07 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: Uh, this is *not* a 64-bit CRC ... 