]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Force-Inline ZSTD_insertAndFindFirstIndex_internal()
authorW. Felix Handte <w@felixhandte.com>
Wed, 2 Sep 2020 16:40:42 +0000 (12:40 -0400)
committerW. Felix Handte <w@felixhandte.com>
Thu, 10 Sep 2020 22:51:52 +0000 (18:51 -0400)
Without this, gcc was declining to inline the function in `ZSTD_noDict` mode,
resulting in a ~10% slowdown.

lib/compress/zstd_lazy.c

index 5d32c78b8516bbf743de30de1e43787ddad5c139..33acf687eccfcc35ba1113c6880ff9be1ea64ac1 100644 (file)
@@ -447,7 +447,7 @@ static size_t ZSTD_BtFindBestMatch_extDict_selectMLS (
 
 /* Update chains up to ip (excluded)
    Assumption : always within prefix (i.e. not within extDict) */
-static U32 ZSTD_insertAndFindFirstIndex_internal(
+FORCE_INLINE_TEMPLATE U32 ZSTD_insertAndFindFirstIndex_internal(
                         ZSTD_matchState_t* ms,
                         const ZSTD_compressionParameters* const cParams,
                         const BYTE* ip, U32 const mls)