make additional use of optimized linear search routines - Mailing list pgsql-hackers

From Nathan Bossart
Subject make additional use of optimized linear search routines
Date
Msg-id 20220901185153.GA783106@nathanxps13
Whole thread Raw
Responses Re: make additional use of optimized linear search routines
List pgsql-hackers
Hi hackers,

Now that we have some optimized linear search routines [0], I thought I'd
quickly check whether we could use them elsewhere.  To start, I took
another look at a previously posted patch [1] and noticed two potentially
useful applications of pg_lfind32().  The attached patches replace the
open-coded linear searches with calls to pg_lfind32().  I haven't done any
performance analysis with these patches yet, and the overall impact might
be limited, but it seemed like low-hanging fruit.

I'm hoping to spend a bit more time looking for additional applications of
the pg_lfind*() suite of functions (and anywhere else where SIMD might be
useful, really).  If you have any ideas in mind, I'm all ears.

[0] https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/port/pg_lfind.h
[1] https://postgr.es/m/20220802221301.GA742739%40nathanxps13

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

Attachment

pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Handle infinite recursion in logical replication setup
Next
From: vignesh C
Date:
Subject: Re: Handle infinite recursion in logical replication setup