diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2024-01-11 14:39:46 +0200 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2024-01-11 14:39:46 +0200 |
commit | 35c03ec6bf66f1b159964c9721a2dce0e2859b20 (patch) | |
tree | ff6f31b68a54170ea2af5166d0e4fe5dbadfecf4 /src | |
parent | liblzma: Rename arch-specific CRC functions and macros. (diff) | |
download | xz-35c03ec6bf66f1b159964c9721a2dce0e2859b20.tar.xz |
liblzma: CRC: Update CLMUL comments to more generic wording.
Diffstat (limited to 'src')
-rw-r--r-- | src/liblzma/check/crc32_fast.c | 16 | ||||
-rw-r--r-- | src/liblzma/check/crc64_fast.c | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/liblzma/check/crc32_fast.c b/src/liblzma/check/crc32_fast.c index 7157e2f4..cf7d75da 100644 --- a/src/liblzma/check/crc32_fast.c +++ b/src/liblzma/check/crc32_fast.c @@ -93,10 +93,10 @@ crc32_generic(const uint8_t *buf, size_t size, uint32_t crc) // Function dispatching // ////////////////////////// -// If both the generic and CLMUL implementations are built, then the -// function to use is selected at runtime since system running the -// binary may not have the CLMUL instructions. -// The three dispatch methods in order of priority: +// If both the generic and arch-optimized implementations are built, then +// the function to use is selected at runtime because the system running +// the binary might not have the arch-specific instruction set extension(s) +// available. The three dispatch methods in order of priority: // // 1. Indirect function (ifunc). This method is slightly more efficient // than the constructor method because it will change the entry in the @@ -195,10 +195,10 @@ extern LZMA_API(uint32_t) lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc) { #if defined(CRC_GENERIC) && defined(CRC_ARCH_OPTIMIZED) - // If CLMUL is available, it is the best for non-tiny inputs, - // being over twice as fast as the generic slice-by-four version. - // However, for size <= 16 it's different. In the extreme case - // of size == 1 the generic version can be five times faster. + // On x86-64, if CLMUL is available, it is the best for non-tiny + // inputs, being over twice as fast as the generic slice-by-four + // version. However, for size <= 16 it's different. In the extreme + // case of size == 1 the generic version can be five times faster. // At size >= 8 the CLMUL starts to become reasonable. It // varies depending on the alignment of buf too. // diff --git a/src/liblzma/check/crc64_fast.c b/src/liblzma/check/crc64_fast.c index 4edca1a2..eb1a4ae4 100644 --- a/src/liblzma/check/crc64_fast.c +++ b/src/liblzma/check/crc64_fast.c @@ -88,8 +88,8 @@ crc64_generic(const uint8_t *buf, size_t size, uint64_t crc) // Function dispatching // ////////////////////////// -// If both the generic and CLMUL implementations are usable, then the -// function that is used is selected at runtime. See crc32_fast.c. +// If both the generic and arch-optimized implementations are usable, then +// the function that is used is selected at runtime. See crc32_fast.c. typedef uint64_t (*crc64_func_type)( const uint8_t *buf, size_t size, uint64_t crc); @@ -160,9 +160,9 @@ lzma_crc64(const uint8_t *buf, size_t size, uint64_t crc) return crc64_func(buf, size, crc); #elif defined(CRC_ARCH_OPTIMIZED) - // If CLMUL is used unconditionally without runtime CPU detection - // then omitting the generic version and its 8 KiB lookup table - // makes the library smaller. + // If arch-optimized version is used unconditionally without runtime + // CPU detection then omitting the generic version and its 8 KiB + // lookup table makes the library smaller. // // FIXME: Lookup table isn't currently omitted on 32-bit x86, // see crc64_table.c. |