pgsql: Avoid function call overhead of pg_popcount() in syslogger.c.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid function call overhead of pg_popcount() in syslogger.c.
Date: 2024-04-02 15:36:13
Message-ID: E1rrgBI-0009Cq-Tu@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid function call overhead of pg_popcount() in syslogger.c.

Instead of calling the pg_popcount() function for a single byte, we
can look up the value in the pg_number_of_ones array.

Discussion: https://postgr.es/m/20240401221117.GB2362108%40nathanxps13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4133c1f45c54f0e52b4bb758f67af78951930e43

Modified Files
--------------
src/backend/postmaster/syslogger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2024-04-02 18:59:47 pgsql: Avoid deadlock during orphan temp table removal.
Previous Message Nathan Bossart 2024-04-02 15:16:29 pgsql: Refactor code for setting pg_popcount* function pointers.