Use direct function calls for pg_popcount{32,64} on non-x86 platforms

John Naylor <john.naylor@postgresql.org>

Commit: 4864c8e8f184a35ed1c2c51a15e9a455e9fbb398
Author: John Naylor <john.naylor@postgresql.org>
Date: 2021-08-16T15:51:15Z
Releases: 15.0
Use direct function calls for pg_popcount{32,64} on non-x86 platforms

Previously, all pg_popcount{32,64} calls were indirected through
a function pointer, even though we had no fast implementation for
non-x86 platforms. Instead, for those platforms use wrappers around
the pg_popcount{32,64}_slow functions.

Review and additional hacking by David Rowley
Reviewed by Álvaro Herrera

Discussion: https://www.postgresql.org/message-id/flat/CAFBsxsE7otwnfA36Ly44zZO%2Bb7AEWHRFANxR1h1kxveEV%3DghLQ%40mail.gmail.com

Files

PathChange+/−
src/include/port/pg_bitutils.h modified +31 −1
src/port/pg_bitutils.c modified +22 −26

Discussion