pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Inline pg_popcount{32,64} into pg_popcount().
Date: Tue, 19 Mar 2024 19:47:51 +0000
Message-ID: <E1rmfR8-004dkP-RL@gemulon.postgresql.org> (raw)

Inline pg_popcount{32,64} into pg_popcount().

On some systems, calls to pg_popcount{32,64} are indirected through
a function pointer.  This commit converts pg_popcount() to a
function pointer on those systems so that we can inline the
appropriate pg_popcount{32,64} implementations into each of the
pg_popcount() implementations.  Since pg_popcount() may call
pg_popcount{32,64} several times, this can significantly improve
its performance.

Suggested-by: David Rowley
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/CAApHDvrb7MJRB6JuKLDEY2x_LKdFHwVbogpjZBCX547i5%2BrXOQ%40mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/include/port/pg_bitutils.h |   5 +-
src/port/pg_bitutils.c         | 155 +++++++++++++++++++++++++++++++----------
2 files changed, 121 insertions(+), 39 deletions(-)



Message-ID: <E1rmfR8-004dkP-RL@gemulon.postgresql.org>
Permalink:  ../E1rmfR8-004dkP-RL@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rmfR8-004dkP-RL@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: Inline pg_popcount{32,64} into pg_popcount().
  In-Reply-To: <E1rmfR8-004dkP-RL@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