From: Yann Collet Date: Wed, 16 Oct 2024 00:46:01 +0000 (-0700) Subject: small dictionary compression speed improvement X-Git-Tag: v1.5.7^2~74^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e63896eb5844cb246aad7959ab208aa0a8f152bd;p=thirdparty%2Fzstd.git small dictionary compression speed improvement not as good as small-blocks improvement, but generally positive. --- diff --git a/lib/compress/zstd_fast.c b/lib/compress/zstd_fast.c index e7edf9490..5373e3640 100644 --- a/lib/compress/zstd_fast.c +++ b/lib/compress/zstd_fast.c @@ -597,8 +597,8 @@ size_t ZSTD_compressBlock_fast_dictMatchState_generic( } } - if (matchIndex > prefixStartIndex && MEM_read32(match) == MEM_read32(ip0)) { - /* found a regular match */ + if (ZSTD_match4Found_cmov(ip0, match, matchIndex, prefixStartIndex)) { + /* found a regular match of size >= 4 */ U32 const offset = (U32) (ip0 - match); mLength = ZSTD_count(ip0 + 4, match + 4, iend) + 4; while (((ip0 > anchor) & (match > prefixStart))