summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorKristoffer Brånemyr <ztion1@yahoo.se>2021-02-03 10:35:22 +0100
committerPádraig Brady <P@draigBrady.com>2021-03-15 12:44:22 +0000
commit4b9118cdb316093e1733264d229c6b7279179e1e (patch)
tree9ca092b67f5aec8352b67abf6abba496ce423ae3 /po
parent90c4ef1f7d21a4df0429f93b43efbe1dc8c572f2 (diff)
downloadcoreutils-4b9118cdb316093e1733264d229c6b7279179e1e.tar.gz
cksum: use pclmul hardware instruction for CRC32 calculation
Use cpuid to detect CPU support for hardware instruction. Fall back to slice by 8 algorithm if not supported. A 500MiB file improves from 1.40s to 0.67s on an i3-2310M * configure.ac [USE_PCLMUL_CRC32]: A new conditional, set when __get_cpuid() and clmul compiler intrinsics are supported. * src/cksum.c (pclmul_supported): A new function using __get_cpuid() to determine if pclmul instructions are supported. (cksum): A new function refactored from cksum_slice8(), which calls pclmul_supported() and then cksum_slice8() or cksum_pclmul() as appropriate. * src/cksum.h: Export the crctab array for use in the new module. * src/cksum_pclmul.c: A new module to implement using pclmul intrinsics. * po/POTFILES.in: Reference the new cksum_pclmul module. * src/local.mk: Likewise. Note we build it as a separate library so that it can be portably built with separate -mavx etc. flags. * tests/misc/cksum.sh: Add new test modes for pertinent buffer sizes.
Diffstat (limited to 'po')
-rw-r--r--po/POTFILES.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5f9c8fc50..b5f5bbff1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -44,6 +44,7 @@ src/chown-core.c
src/chown.c
src/chroot.c
src/cksum.c
+src/cksum_pclmul.c
src/comm.c
src/copy.c
src/coreutils.c