agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Auto-vectorize the varbit bitwise operators.
Date: Thu, 03 Sep 2026 21:11:18 +0000
Message-ID: <E1x2EiL-00000003Mb6-233F@gemulon.postgresql.org> (raw)
Auto-vectorize the varbit bitwise operators.
Compile varbit.c with -ftree-vectorize where available, and adjust
the loops in bit_and(), bit_or(), bitxor(), and bitnot() so that
they are amenable to being auto-vectorized. (Mainly, that involves
reading the byte count into a local variable before the loop. As
written, the bound is recomputed from the varlena header on every
iteration, because the compiler must assume that the loop might
modify the header.)
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/aphxrw6NkYkLMtZN%40nathan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9a40e39b1e8780ba75e014cb87860249c405c37e
Modified Files
--------------
src/backend/utils/adt/Makefile | 3 ++-
src/backend/utils/adt/meson.build | 9 ++++-----
src/backend/utils/adt/varbit.c | 26 +++++++++++++++++---------
3 files changed, 23 insertions(+), 15 deletions(-)
Message-ID: <E1x2EiL-00000003Mb6-233F@gemulon.postgresql.org>
Permalink: ../E1x2EiL-00000003Mb6-233F@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x2EiL-00000003Mb6-233F@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Auto-vectorize the varbit bitwise operators.
In-Reply-To: <E1x2EiL-00000003Mb6-233F@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox