Remove 'generic' inline strategy
Seems to avoid performance loss for compression. Same strategy tested on decompression side, did not appear to improve speed.
This commit is contained in:
@@ -576,11 +576,11 @@ void ZSTD_seqToCodes(const seqStore_t* seqStorePtr)
|
|||||||
mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
|
mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MEM_STATIC size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
|
||||||
FORCE_INLINE size_t ZSTD_compressSequences_generic (ZSTD_CCtx* zc,
|
|
||||||
void* dst, size_t dstCapacity,
|
void* dst, size_t dstCapacity,
|
||||||
size_t srcSize, int const longOffsets)
|
size_t srcSize)
|
||||||
{
|
{
|
||||||
|
const int longOffsets = zc->params.cParams.windowLog > STREAM_ACCUMULATOR_MIN;
|
||||||
const seqStore_t* seqStorePtr = &(zc->seqStore);
|
const seqStore_t* seqStorePtr = &(zc->seqStore);
|
||||||
U32 count[MaxSeq+1];
|
U32 count[MaxSeq+1];
|
||||||
S16 norm[MaxSeq+1];
|
S16 norm[MaxSeq+1];
|
||||||
@@ -782,17 +782,6 @@ _check_compressibility:
|
|||||||
return op - ostart;
|
return op - ostart;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE_INLINE size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
|
|
||||||
void* dst, size_t dstCapacity,
|
|
||||||
size_t srcSize)
|
|
||||||
{
|
|
||||||
if (zc->params.cParams.windowLog > STREAM_ACCUMULATOR_MIN) {
|
|
||||||
return ZSTD_compressSequences_generic(zc, dst, dstCapacity, srcSize, 1);
|
|
||||||
} else {
|
|
||||||
return ZSTD_compressSequences_generic(zc, dst, dstCapacity, srcSize, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0 /* for debug */
|
#if 0 /* for debug */
|
||||||
# define STORESEQ_DEBUG
|
# define STORESEQ_DEBUG
|
||||||
#include <stdio.h> /* fprintf */
|
#include <stdio.h> /* fprintf */
|
||||||
|
|||||||
Reference in New Issue
Block a user