mirror of
https://github.com/lz4/lz4.git
synced 2024-11-24 10:24:00 +08:00
disable shortcut for LZ4_decompress_fast()
improving speed
This commit is contained in:
parent
bd06fde104
commit
cd0663456f
@ -1536,9 +1536,10 @@ LZ4_FORCE_INLINE int LZ4_decompress_generic(
|
||||
* this shortcut was tested on x86 and x64, where it improves decoding speed.
|
||||
* it has not yet been benchmarked on ARM, Power, mips, etc.
|
||||
* NOTE: The loop begins with a read, so we must have one byte left at the end. */
|
||||
if (((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend)
|
||||
& (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend))
|
||||
& ((token < (15<<ML_BITS)) & ((token & ML_MASK) != 15)) ) {
|
||||
if (endOnInput
|
||||
&& ((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend)
|
||||
& (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend))
|
||||
& ((token < (15<<ML_BITS)) & ((token & ML_MASK) != 15)) ) {
|
||||
size_t const ll = token >> ML_BITS;
|
||||
size_t const off = LZ4_readLE16(ip+ll);
|
||||
const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */
|
||||
|
Loading…
Reference in New Issue
Block a user