pgsql: Rename "fast" and "slow" popcount functions.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Rename "fast" and "slow" popcount functions.
Date: 2026-01-21 20:21:28
Message-ID: E1viehj-001rU2-2X@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Heikki Linnakangas <hlinnaka(at)iki(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2026-01-21 20:25:00 Re: pgsql: tests: Add a test C++ extension module
Previous Message Tom Lane 2026-01-21 20:08:49 pgsql: Force standard_conforming_strings to always be ON.