From 108adfcb422ba5c2594a72b8fd5c9df38cc9ca6e Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 16 Apr 2019 11:20:31 -0700 Subject: minor news update for msys2 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 6313142..7a3a071 100644 --- a/NEWS +++ b/NEWS @@ -8,7 +8,7 @@ build: source code can be amalgamated, by Bing Xu build: added meson build, by @lzutao build: new build macros : LZ4_DISTANCE_MAX, LZ4_FAST_DEC_LOOP install: MidnightBSD, by @laffer1 -install: Windows 10 msys2, by @vtorri +install: msys2 on Windows 10, by @vtorri v1.8.3 perf: minor decompression speed improvement (~+2%) with gcc -- cgit v0.12 From 6fc763cd98eb9a487afc9c2577627c4028e43cef Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 16 Apr 2019 11:26:03 -0700 Subject: ensure consistent definition and usage of FREEMEM as suggested by @sloutsky in #671 --- lib/lz4frame.c | 8 ++++---- lib/lz4hc.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/lz4frame.c b/lib/lz4frame.c index 19efd0b..42124e9 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -72,15 +72,15 @@ * by modifying below section. */ #include /* malloc, calloc, free */ -#define ALLOC(s) malloc(s) #ifndef LZ4_SRC_INCLUDED /* avoid redefinition when sources are coalesced */ -# define ALLOC_AND_ZERO(s) calloc(1,(s)) +# define ALLOC(s) malloc(s) +# define ALLOC_AND_ZERO(s) calloc(1,(s)) +# define FREEMEM(p) free(p) #endif -#define FREEMEM(p) free(p) #include /* memset, memcpy, memmove */ #ifndef LZ4_SRC_INCLUDED /* avoid redefinition when sources are coalesced */ -# define MEM_INIT memset +# define MEM_INIT(p,v,s) memset((p),(v),(s)) #endif diff --git a/lib/lz4hc.c b/lib/lz4hc.c index f6ed779..d5f6743 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -868,7 +868,7 @@ int LZ4_compress_HC(const char* src, char* dst, int srcSize, int dstCapacity, in #endif int const cSize = LZ4_compress_HC_extStateHC(statePtr, src, dst, srcSize, dstCapacity, compressionLevel); #if defined(LZ4HC_HEAPMODE) && LZ4HC_HEAPMODE==1 - free(statePtr); + FREEMEM(statePtr); #endif return cSize; } @@ -901,7 +901,7 @@ int LZ4_freeStreamHC (LZ4_streamHC_t* LZ4_streamHCPtr) { DEBUGLOG(4, "LZ4_freeStreamHC(%p)", LZ4_streamHCPtr); if (!LZ4_streamHCPtr) return 0; /* support free on NULL */ - free(LZ4_streamHCPtr); + FREEMEM(LZ4_streamHCPtr); return 0; } -- cgit v0.12 From d25b6d640132bb25a3db9617a8708d31701402f5 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 16 Apr 2019 11:52:54 -0700 Subject: minor benchmark update was using wrong memory timing --- NEWS | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 7a3a071..2d85607 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ v1.9.0 -perf: large decompression speed improvement on x86/x64 (~+20%) by @djwatson +perf: large decompression speed improvement on x86/x64 (up to +20%) by @djwatson api : changed : _destSize() compression variants are promoted to stable API api : new : LZ4_initStream(HC), replacing LZ4_resetStream(HC) api : changed : LZ4_resetStream(HC) as recommended reset function, for better performance on small data diff --git a/README.md b/README.md index fd58573..73554cd 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ Benchmarks The benchmark uses [lzbench], from @inikep compiled with GCC v8.2.0 on Linux 64-bits (Ubuntu 4.18.0-17). -The reference system uses a Core i7-9700K CPU @ 4.9GHz. +The reference system uses a Core i7-9700K CPU @ 4.9GHz (w/ turbo boost). Benchmark evaluates the compression of reference [Silesia Corpus] in single-thread mode. @@ -61,14 +61,14 @@ in single-thread mode. | Compressor | Ratio | Compression | Decompression | | ---------- | ----- | ----------- | ------------- | | memcpy | 1.000 | 13700 MB/s | 13700 MB/s | -|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4900 MB/s** | +|**LZ4 default (v1.9.0)** |**2.101**| **780 MB/s**| **4970 MB/s** | | LZO 2.09 | 2.108 | 670 MB/s | 860 MB/s | | QuickLZ 1.5.0 | 2.238 | 575 MB/s | 780 MB/s | | Snappy 1.1.4 | 2.091 | 565 MB/s | 1950 MB/s | | [Zstandard] 1.4.0 -1 | 2.883 | 515 MB/s | 1380 MB/s | | LZF v3.6 | 2.073 | 415 MB/s | 910 MB/s | | [zlib] deflate 1.2.11 -1| 2.730 | 100 MB/s | 415 MB/s | -|**LZ4 HC -9 (v1.8.2)** |**2.721**| 39 MB/s | **4850 MB/s** | +|**LZ4 HC -9 (v1.8.2)** |**2.721**| 41 MB/s | **4900 MB/s** | | [zlib] deflate 1.2.11 -6| 3.099 | 36 MB/s | 445 MB/s | [zlib]: http://www.zlib.net/ -- cgit v0.12