Re: Use POPCNT on MSVC - Mailing list pgsql-hackers

From David Rowley
Subject Re: Use POPCNT on MSVC
Date
Msg-id CAApHDvrWb6vYOSPfCY+zzu7-eQJkwXXqLdkKnvYHP1u3rsMRWw@mail.gmail.com
Whole thread Raw
In response to Re: Use POPCNT on MSVC  (John Naylor <john.naylor@enterprisedb.com>)
Responses Re: Use POPCNT on MSVC
List pgsql-hackers
On Thu, 5 Aug 2021 at 07:02, John Naylor <john.naylor@enterprisedb.com> wrote:
> > #if defined(_MSC_VER) && defined(_WIN64)
> > #define HAVE_X86_64_POPCNTQ
> > #endif
>
> That seems fine. I don't know PG can build with Arm on Windows, but for the cpuid to work, it seems safer to also
checkfor __x86_64?
 

That's a good point. I've adjusted it to do #if defined(_MSC_VER) &&
defined(_M_AMD64).

I've attached a v2 patch which I think is more along the lines of what
you had in mind.

David

Attachment

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Another regexp performance improvement: skip useless paren-captures
Next
From: John Naylor
Date:
Subject: Re: Use POPCNT on MSVC