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

From Heikki Linnakangas
Subject Re: What exactly is our CRC algorithm?
Date
Msg-id 54A2B13E.8080806@vmware.com
Whole thread Raw
In response to Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
Responses Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
On 12/30/2014 09:40 AM, Abhijit Menon-Sen wrote:
> Hi.
>
> I'm re-attaching the two patches as produced by format-patch. I haven't
> listed any reviewers. It's either just Andres, or maybe a lot of people.
>
> Is anyone in a position to try out the patches on MSVC and see if they
> build and work sensibly, please? (Otherwise it may be better to remove
> those bits from the patch for now.)

A couple of quick comments:

bswap32 is unused on on little-endian systems. That will give a compiler 
warning.

pg_comp_crc32c_sse processes one byte at a time, until the pointer is 
4-bytes aligned. Then it processes 8 bytes at a time. So it fetches the 
8-byte chunks from only 4-byte aligned addresses. Is that intentional? 
If unaligned access performs well, why bother with the initial 
byte-at-a-time processing at all?

- Heikki




pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Additional role attributes && superuser review
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] ON_ERROR_ROLLBACK