From: W. Felix Handte Date: Wed, 2 Sep 2020 16:40:42 +0000 (-0400) Subject: Force-Inline ZSTD_insertAndFindFirstIndex_internal() X-Git-Tag: v1.4.7~81^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f49c1563ff2405b0db4b3ef77dd9bbb8ee64deb1;p=thirdparty%2Fzstd.git Force-Inline ZSTD_insertAndFindFirstIndex_internal() Without this, gcc was declining to inline the function in `ZSTD_noDict` mode, resulting in a ~10% slowdown. --- diff --git a/lib/compress/zstd_lazy.c b/lib/compress/zstd_lazy.c index 5d32c78b8..33acf687e 100644 --- a/lib/compress/zstd_lazy.c +++ b/lib/compress/zstd_lazy.c @@ -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)