pgsql: Add optimized functions for linear search within byte arrays

From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add optimized functions for linear search within byte arrays
Date: 2022-08-26 07:03:58
Message-ID: E1oRTNk-001FvD-TU@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add optimized functions for linear search within byte arrays

In similar vein to b6ef167564, add pg_lfind8() and pg_lfind8_le()
to search for bytes equal or less-than-or-equal to a given byte,
respectively. To abstract away platform details, add helper functions
and typedefs to simd.h.

John Naylor and Nathan Bossart, per suggestion from Andres Freund

Discussion: https://www.postgresql.org/message-id/CAFBsxsGzaaGLF%3DNuq61iRXTyspbO9rOjhSqFN%3DV6ozzmta5mXg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e813e0e16852c080259cd0813e1a82ecb2625aea

Modified Files
--------------
src/include/port/pg_lfind.h | 68 ++++++++-
src/include/port/simd.h | 168 ++++++++++++++++++++-
.../modules/test_lfind/expected/test_lfind.out | 18 ++-
src/test/modules/test_lfind/sql/test_lfind.sql | 4 +-
src/test/modules/test_lfind/test_lfind--1.0.sql | 10 +-
src/test/modules/test_lfind/test_lfind.c | 100 +++++++++++-
6 files changed, 358 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Etsuro Fujita 2022-08-26 08:07:18 pgsql: Fix typo in comment.
Previous Message David Rowley 2022-08-26 00:53:16 Re: pgsql: Move memory management away from writetup() and tuplesort_put*()