Re: Re: CRC - Mailing list pgsql-hackers

From Bruce Guenter
Subject Re: Re: CRC
Date
Msg-id 20001208153256.C11989@em.ca
Whole thread Raw
In response to Re: Re: CRC  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Re: CRC  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Dec 08, 2000 at 04:21:21PM -0500, Tom Lane wrote:
> ncm@zembu.com (Nathan Myers) writes:
> > Thinking about it, I suspect that any CRC implementation that can't outrun
> > MD5 by a wide margin is seriously sub-optimal.
> I was finding that hard to believe, too, at least for CRC-32 (CRC-64
> would take more code, so I'm not so sure about it).

Would you like to see the simple benchmarking setup I used?  The amount
of code involved (once all the hashes are factored in) is fairly large,
so I'm somewhat hesitant to just send it to the mailing list.

> Is that 64-bit code you pointed us to before actually a CRC, or
> something else?  It doesn't call itself a CRC, and I was having a hard
> time extracting anything definite (like the polynomial) from all the
> bit-pushing underbrush :-(

It isn't a CRC.  It's a fingerprint.  As you've mentioned, it doesn't
have the guarantees against burst errors that a CRC would have, but it
does have as good as random collision avoidance over any random data
corruption.  At least, that's what the author claims.  My math isn't
nearly good enough to verify such claims.
--
Bruce Guenter <bruceg@em.ca>                       http://em.ca/~bruceg/

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Hash index on macaddr -> crash
Next
From: Bruce Guenter
Date:
Subject: Re: CRC was: Re: beta testing version