pgsql: Remove some unnecessary optimizations in popcount code. - Mailing list pgsql-committers

From Nathan Bossart
Subject pgsql: Remove some unnecessary optimizations in popcount code.
Date
Msg-id E1vqaa8-000PZM-0q@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Remove some unnecessary optimizations in popcount code.

Over the past few releases, we've added a huge amount of complexity
to our popcount implementations.  Commits fbe327e5b4, 79e232ca01,
8c6653516c, and 25dc485074 did some preliminary refactoring, but
many opportunities remain.  In particular, if we disclaim interest
in micro-optimizing this code for 32-bit builds and in unnecessary
alignment checks on x86-64, we can remove a decent chunk of code.
I cannot find public discussion or benchmarks for the code this
commit removes,  but it seems unlikely that this change will
noticeably impact performance on affected systems.

Suggested-by: John Naylor <johncnaylorls@gmail.com>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/CANWCAZY7R%2Biy%2Br9YM_sySNydHzNqUirx1xk0tB3ej5HO62GdgQ%40mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/include/port/pg_bitutils.h | 16 ++--------
src/port/pg_bitutils.c         | 30 -------------------
src/port/pg_popcount_x86.c     | 67 ++++++++----------------------------------
3 files changed, 14 insertions(+), 99 deletions(-)


pgsql-committers by date:

Previous
From: Dean Rasheed
Date:
Subject: pgsql: Add support for INSERT ... ON CONFLICT DO SELECT.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Make pg_numa_query_pages() work in frontend programs