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 5512EDFB.4070704@iki.fi
Whole thread Raw
In response to Re: What exactly is our CRC algorithm?  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: What exactly is our CRC algorithm?  (Andres Freund <andres@2ndquadrant.com>)
Re: What exactly is our CRC algorithm?  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers
On 02/12/2015 09:26 PM, Heikki Linnakangas wrote:
> On 02/11/2015 04:20 PM, Abhijit Menon-Sen wrote:
>> At 2015-02-11 13:20:29 +0200, hlinnakangas@vmware.com wrote:
>>>
>>> I don't follow. I didn't change configure at all, compared to your
>>> patch.
>>
>> OK, I extrapolated a little too much. Your patch didn't actually include
>> crc_instructions.h;
>
> Oh, I'm sorry. Here's the complete patch with crc_instructions.h

I was just about to commit the attached, which is the same as the
previous patch with just cosmetic comment changes, but then I realized
that this probably doesn't compile with Visual Studio 2005 or older. The
code does "#ifdef _MSC_VER", and then uses the _mm_crc32_u64 intrinsic,
but that intrinsic was added in Visual Studio 2008. I think we'll need a
version check there. Or better yet, a direct configure test to check if
the intrinsic exists - that way we get to also use it on Intel
compilers, which I believe also has the same intrinsics.

You want to write that or should I? How do you like this latest version
of the patch otherwise? You had some criticism earlier, but I had
forgotten to include the crc_instructions.h header file in that earlier
version.

- Heikki


Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0
Next
From: Andres Freund
Date:
Subject: Re: What exactly is our CRC algorithm?