Re: likely/unlikely usage validation
Dan Carpenter <[email protected]> Wed, 29 May 2024 17:36:59 +0300
| Newsgroups | org.kernel.vger.smatch |
|---|---|
| Message-ID | <[email protected]> |
On Wed, May 29, 2024 at 10:44:08AM +0200, Rasmus Villemoes wrote:
> diff -u -p ./lib/lz4/lz4_decompress.c /tmp/nothing/lib/lz4/lz4_decompress.c
> --- ./lib/lz4/lz4_decompress.c
> +++ /tmp/nothing/lib/lz4/lz4_decompress.c
> @@ -199,9 +199,6 @@ static FORCE_INLINE int LZ4_decompress_g
> do {
> s = *ip++;
> length += s;
> - } while (likely(endOnInput
> - ? ip < iend - RUN_MASK
> - : 1) & (s == 255));
I wonder if there really is any performance benefit to using & instead
of &&...
regards,
dan carpenter