Merge pull request #673 from lz4/dev

minor update for v1.9.0
This commit is contained in:
Yann Collet 2019-04-16 13:55:28 -07:00 committed by GitHub
commit 131896ab9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

4
NEWS
View File

@ -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
@ -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

View File

@ -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/

View File

@ -72,15 +72,15 @@
* by modifying below section.
*/
#include <stdlib.h> /* 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 <string.h> /* 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

View File

@ -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;
}