mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
3dc2d62d04
Modern x86 and x86-64 processors with SSE 4.2 support have special instructions, crc32b and crc32q, for calculating CRC-32C. They greatly speed up CRC calculation. Whether the instructions can be used or not depends on the compiler and the target architecture. If generation of SSE 4.2 instructions is allowed for the target (-msse4.2 flag on gcc and clang), use them. If they are not allowed by default, but the compiler supports the -msse4.2 flag to enable them, compile just the CRC-32C function with -msse4.2 flag, and check at runtime whether the processor we're running on supports it. If it doesn't, fall back to the slicing-by-8 algorithm. (With the common defaults on current operating systems, the runtime-check variant is what you get in practice.) Abhijit Menon-Sen, heavily modified by me, reviewed by Andres Freund. |
||
---|---|---|
.. | ||
ac_func_accept_argtypes.m4 | ||
acx_pthread.m4 | ||
c-compiler.m4 | ||
c-library.m4 | ||
config.guess | ||
config.sub | ||
docbook.m4 | ||
general.m4 | ||
install-sh | ||
libtool.m4 | ||
Makefile | ||
missing | ||
perl.m4 | ||
prep_buildtree | ||
programs.m4 | ||
python.m4 | ||
tcl.m4 | ||
test_quiet_include.h |