Re: optimize lookups in snapshot [sub]xip arrays

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, John Naylor <jcnaylor(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: optimize lookups in snapshot [sub]xip arrays
Date: 2022-07-30 05:38:11
Message-ID: 20220730053811.GA417958@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 30, 2022 at 12:02:02PM +0700, John Naylor wrote:
> On Fri, Jul 29, 2022 at 4:34 AM Nathan Bossart <nathandbossart(at)gmail(dot)com>
> wrote:
>> * I borrowed USE_SSE2 from one of John Naylor's patches [0]. I'm not
> sure
>> whether this is committable,
>
> I'll be the first to say it's not committable and needs some thought. Since
> there are several recently proposed patches that take advantage of SSE2, it
> seems time for me to open a new thread and get that prerequisite settled.
> I'll do that next week.

Awesome. I will help test and review.

>> so I would welcome thoughts on the proper
>> form. Given the comment says that SSE2 is supported by all x86-64
>> hardware, I'm not seeing why we need the SSE 4.2 checks. Is it not
>> enough to check for __x86_64__ and _M_AMD64?
>
> That's enough for emitting instructions that the target CPU can run, but
> says nothing (I think) about the host compiler's ability to understand the
> intrinsics and associated headers. The architecture is old enough that
> maybe zero compilers in the buildfarm that target AMD64 fail to understand
> SSE2 intrinsics, but I hadn't looked into it. The SSE 4.2 intrinsics check
> is not necessary, but it was sufficient and already present, so I borrowed
> it for the PoC.

Got it, makes sense.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2022-07-30 05:44:01 Re: pg15b2: large objects lost on upgrade
Previous Message Justin Pryzby 2022-07-30 05:35:38 Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)