Re: What exactly is our CRC algorithm?

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: What exactly is our CRC algorithm?
Date: 2014-12-30 14:05:50
Message-ID: 54A2B13E.8080806@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-12-30 14:20:06 Re: [HACKERS] ON_ERROR_ROLLBACK
Previous Message Stephen Frost 2014-12-30 13:05:45 Re: Additional role attributes && superuser review