Re: optimize lookups in snapshot [sub]xip arrays

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, 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-08-03 20:25:40
Message-ID: 20220803202540.GA1088968@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed, Aug 03, 2022 at 11:06:58AM -0700, Andres Freund wrote:
> On 2022-08-02 16:43:57 -0700, Nathan Bossart wrote:
>> >> +#ifdef USE_SSE2
>> >> +pg_attribute_no_sanitize_alignment()
>> >> +#endif
>> >
>> > What's the deal with this annotation? Needs a comment.
>> Will do. c.h suggests that this should only be used for x86-specific code.
> What I'm asking is why the annotation is needed at all?

Upon further inspection, I don't think this is needed. I originally
borrowed it from the SSE version of the CRC code, but while it is trivial
to produce alignment failures with the CRC code, I haven't been able to
generate any with my patches. Looking at the code, I'm not sure why I was
worried about this in the first place. Please pardon the brain fade.

Here is a new patch set without the annotation.

Nathan Bossart
Amazon Web Services:

Attachment Content-Type Size
v6-0001-Support-SSE2-intrinsics-where-available.patch text/x-diff 2.1 KB
v6-0002-Introduce-optimized-routine-for-linear-searches-t.patch text/x-diff 3.1 KB
v6-0003-Optimize-linear-searches-in-XidInMVCCSnapshot.patch text/x-diff 2.8 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2022-08-03 20:28:08 Re: Proposal: Support custom authentication methods using hooks
Previous Message Andres Freund 2022-08-03 20:20:14 Re: pg15b2: large objects lost on upgrade