From bd06fde104c7c29b8d748dad8f27a08c328b74fe Mon Sep 17 00:00:00 2001 From: Cyan4973 Date: Mon, 23 Apr 2018 15:42:27 -0700 Subject: fullbench compiled without assert() to better reflect release speed --- lib/Makefile | 1 + tests/Makefile | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 7b31239..673406d 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -181,6 +181,7 @@ uninstall: @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4.h @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4hc.h @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4frame.h + @$(RM) $(DESTDIR)$(INCLUDEDIR)/lz4frame_static.h @echo lz4 libraries successfully uninstalled endif diff --git a/tests/Makefile b/tests/Makefile index 2b93c9f..d4847b1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -80,7 +80,8 @@ lz4c32: # create a 32-bits version for 32/64 interop tests %.o : $(LZ4DIR)/%.c $(LZ4DIR)/%.h $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ -fullbench : lz4.o lz4hc.o lz4frame.o xxhash.o fullbench.c +fullbench : DEBUGLEVEL=0 +fullbench : lz4.o lz4hc.o lz4frame.o xxhash.o fullbench.c $(CC) $(FLAGS) $^ -o $@$(EXT) $(LZ4DIR)/liblz4.a: -- cgit v0.12 From cd0663456f82b6d771e6aed01c6c4ff7f1bf4358 Mon Sep 17 00:00:00 2001 From: Cyan4973 Date: Mon, 23 Apr 2018 15:47:08 -0700 Subject: disable shortcut for LZ4_decompress_fast() improving speed --- lib/lz4.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index 40b2229..d794c35 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -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; size_t const off = LZ4_readLE16(ip+ll); const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */ -- cgit v0.12 From 644b7bd2b62b10da2b464d71655ae2ed523fdc33 Mon Sep 17 00:00:00 2001 From: Cyan4973 Date: Mon, 23 Apr 2018 15:52:44 -0700 Subject: fixed minor declaration issue with clang on msys --- programs/util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/util.h b/programs/util.h index ff25106..ef6ca77 100644 --- a/programs/util.h +++ b/programs/util.h @@ -30,8 +30,9 @@ extern "C" { * Dependencies ******************************************/ #include "platform.h" /* PLATFORM_POSIX_VERSION */ -#include /* malloc */ #include /* size_t, ptrdiff_t */ +#include /* malloc */ +#include /* strlen, strncpy */ #include /* fprintf */ #include /* stat, utime */ #include /* stat */ -- cgit v0.12 From 44bff3fd3b4fc6280cad3f8b930d6a404e3bb236 Mon Sep 17 00:00:00 2001 From: Cyan4973 Date: Mon, 23 Apr 2018 19:26:02 -0700 Subject: re-ordered parenthesis to avoid mixing && and & as suggested by @terrelln --- lib/lz4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/lz4.c b/lib/lz4.c index d794c35..b2e08e3 100644 --- a/lib/lz4.c +++ b/lib/lz4.c @@ -1538,8 +1538,9 @@ LZ4_FORCE_INLINE int LZ4_decompress_generic( * NOTE: The loop begins with a read, so we must have one byte left at the end. */ if (endOnInput && ((ip + 14 /*maxLL*/ + 2 /*offset*/ < iend) - & (op + 14 /*maxLL*/ + 18 /*maxML*/ <= oend)) - & ((token < (15<> ML_BITS; size_t const off = LZ4_readLE16(ip+ll); const BYTE* const matchPtr = op + ll - off; /* pointer underflow risk ? */ -- cgit v0.12