From: Yann Collet Date: Mon, 6 Nov 2017 23:42:50 +0000 (-0800) Subject: 2-stages LZ4_count X-Git-Tag: upstream/1.9.3~11^2~26^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d51f0466289d9a021291e736b463cf8de7bd60bd;p=platform%2Fupstream%2Flz4.git 2-stages LZ4_count separate first branch from the rest of the compare loop to get dedicated prediction. measured a 3-4% compression speed improvement. --- diff --git a/lib/lz4.c b/lib/lz4.c index 64a2e82..ff6496c 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -407,7 +407,15 @@ static unsigned LZ4_count(const BYTE* pIn, const BYTE* pMatch, const BYTE* pInLi { const BYTE* const pStart = pIn; - while (likely(pIn