Re: What exactly is our CRC algorithm? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: What exactly is our CRC algorithm?
Date
Msg-id 20141230172641.GJ27028@alap3.anarazel.de
Whole thread Raw
In response to Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
On 2014-12-30 21:36:19 +0530, Abhijit Menon-Sen wrote:
> Thanks for spotting that. I had meant to change the test to "& 7". But
> again, now that you mention it, I'm not sure it's necessary. The CRC32*
> instructions don't have the usual SSE alignment requirements, and I see
> that the Linux kernel (among other implementations) process eight bytes
> at a time from the start of the buffer and then process the remaining
> bytes one at a time. I'll do a bit more research and post an update.

I'd done some quick and dirty benchmarking when writing my initial
crc32c POC and I found that four byte aligned accesses were faster than
ones not. But it really just was running it a couple times, nothing more.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: BUG #12330: ACID is broken for unique constraints
Next
From: Jeff Janes
Date:
Subject: Re: Maximum number of WAL files in the pg_xlog directory