Re: What exactly is our CRC algorithm?

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: hlinnaka(at)iki(dot)fi, Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Abhijit Menon-Sen <ams(at)2ndQuadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: What exactly is our CRC algorithm?
Date: 2015-03-31 03:10:26
Message-ID: 551A1022.70001@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/03/15 18:24, Heikki Linnakangas wrote:
> On 03/25/2015 07:20 PM, Andres Freund wrote:
>> On 2015-03-25 19:18:51 +0200, Heikki Linnakangas wrote:
>>> 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.
>>
>> Maybe I'm missing something, but configure isn't run for msvc?
>
> Good point. On MSVC, we use the pre-built pg_config.h.win32 file
> instead. There are already a couple of cases like this in it:
>
> /* Define to 1 if you have the `rint' function. */
> #if (_MSC_VER >= 1800)
> #define HAVE_RINT 1
> #endif
>
> I think we should do that for the CRC32 intrinsic too.
>

Yeah, 1500 being MSVC 2008. But I think there is little point in putting
it in pg_config.h.win32 when it's only going to be used in 2 places in
single header file.

Do you plan to commit this otherwise as is?

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2015-03-31 03:48:06 Re: Relation extension scalability
Previous Message Petr Jelinek 2015-03-31 02:25:18 Cleanup double semicolons at the end of source lines