Remove 'generic' inline strategy
Seems to avoid performance loss for compression.
Same strategy tested on decompression side, did not appear to improve
speed.
diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c
index 5d81f8a..6b80472 100644
--- a/lib/compress/zstd_compress.c
+++ b/lib/compress/zstd_compress.c
@@ -576,11 +576,11 @@
mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
}
-
-FORCE_INLINE size_t ZSTD_compressSequences_generic (ZSTD_CCtx* zc,
+MEM_STATIC size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
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);
U32 count[MaxSeq+1];
S16 norm[MaxSeq+1];
@@ -782,17 +782,6 @@
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 */
# define STORESEQ_DEBUG
#include <stdio.h> /* fprintf */