postgresql/config
Nathan Bossart 792752af4e Optimize pg_popcount() with AVX-512 instructions.
Presently, pg_popcount() processes data in 32-bit or 64-bit chunks
when possible.  Newer hardware that supports AVX-512 instructions
can use 512-bit chunks, which provides a nice speedup, especially
for larger buffers.  This commit introduces the infrastructure
required to detect compiler and CPU support for the required
AVX-512 intrinsic functions, and it adds a new pg_popcount()
implementation that uses these functions.  If CPU support for this
optimized implementation is detected at runtime, a function pointer
is updated so that it is used by subsequent calls to pg_popcount().

Most of the existing in-tree calls to pg_popcount() should benefit
from these instructions, and calls with smaller buffers should at
least not regress compared to v16.  The new infrastructure
introduced by this commit can also be used to optimize
visibilitymap_count(), but that is left for a follow-up commit.

Co-authored-by: Paul Amonson, Ants Aasma
Reviewed-by: Matthias van de Meent, Tom Lane, Noah Misch, Akash Shankaran, Alvaro Herrera, Andres Freund, David Rowley
Discussion: https://postgr.es/m/BL1PR11MB5304097DF7EA81D04C33F3D1DCA6A%40BL1PR11MB5304.namprd11.prod.outlook.com
2024-04-06 21:56:23 -05:00
..
Makefile Install our "missing" script where PGXS builds can find it. 2015-12-11 16:15:05 -05:00
ax_pthread.m4 Update config/ax_pthread.m4 to latest upstream version. 2018-11-19 15:05:33 -05:00
c-compiler.m4 Optimize pg_popcount() with AVX-512 instructions. 2024-04-06 21:56:23 -05:00
c-library.m4 All supported systems have locale_t. 2023-07-09 11:55:18 +12:00
check_decls.m4 Fix configure's AC_CHECK_DECLS tests to work correctly with clang. 2018-11-19 12:01:47 -05:00
check_modules.pl Add copyright notices to a few perl scripts that don't have them 2024-01-05 13:15:50 +00:00
config.guess Update config.guess and config.sub 2023-04-12 09:16:19 +02:00
config.sub Fix typos in comments 2023-05-02 12:23:08 +09:00
general.m4 Rename configure.in to configure.ac 2020-07-24 10:42:08 +02:00
install-sh Fix install-strip on Mac OS X 2012-08-21 23:42:43 -04:00
llvm.m4 jit: Require at least LLVM 10. 2024-01-25 15:42:34 +13:00
meson.build meson: Add initial version of meson based build system 2022-09-21 22:37:17 -07:00
missing Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
perl.m4 Remove MSVC scripts 2023-12-20 09:44:37 +09:00
pkg.m4 Fix collection of typos in the code and the documentation 2022-03-15 11:29:35 +09:00
prep_buildtree Fix vpath build 2019-03-27 23:36:00 +01:00
programs.m4 Remove distprep 2023-11-06 15:18:04 +01:00
python.m4 Unify DLSUFFIX on Darwin 2022-07-06 07:41:33 +02:00
tcl.m4 configure: More use of AC_ARG_VAR 2019-01-18 08:38:34 +01:00