From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rename "fast" and "slow" popcount functions.
Date: Wed, 21 Jan 2026 20:21:28 +0000
Message-ID: <E1viehj-001rU2-2X@gemulon.postgresql.org> (raw)
Rename "fast" and "slow" popcount functions.
Since we now have several implementations of the popcount
functions, let's give them more descriptive names. This commit
replaces "slow" with "portable" and "fast" with "sse42". While the
POPCNT instruction is technically not part of SSE4.2, this naming
scheme is close enough in practice and is arguably easier to
understand than using "popcnt" instead.
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Discussion: https://postgr.es/m/aWf_InS1VrbeXAfP%40nathan
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8c6653516c5ad23628cc50d4cee1e6446e7f758d
Modified Files
--------------
src/include/port/pg_bitutils.h | 8 +++---
src/port/pg_bitutils.c | 38 ++++++++++++++--------------
src/port/pg_popcount_x86.c | 56 ++++++++++++++++++++++--------------------
3 files changed, 53 insertions(+), 49 deletions(-)
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: Rename "fast" and "slow" popcount functions.
In-Reply-To: <E1viehj-001rU2-2X@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox