Update results.csv, add Row hash to regression test
parent
4694423c4f
commit
4d63d6e8aa
|
@ -1304,7 +1304,7 @@ size_t ZSTD_RowFindBestMatch_generic (
|
|||
ddsIdx = ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG;
|
||||
PREFETCH_L1(&dms->hashTable[ddsIdx]);
|
||||
}
|
||||
ddsExtraAttempts = cParams->searchLog > rowLog ? 1U << (cParams->searchLog - 5) : 0;
|
||||
ddsExtraAttempts = cParams->searchLog > rowLog ? 1U << (cParams->searchLog - rowLog) : 0;
|
||||
}
|
||||
|
||||
if (dictMode == ZSTD_dictMatchState) {
|
||||
|
@ -1395,8 +1395,7 @@ size_t ZSTD_RowFindBestMatch_generic (
|
|||
const U32 dmsSize = (U32)(dmsEnd - dmsBase);
|
||||
const U32 dmsIndexDelta = dictLimit - dmsSize;
|
||||
|
||||
{ /* Get the hash for ip, compute the appropriate row */
|
||||
U32 const head = *dmsTagRow & rowMask;
|
||||
{ U32 const head = *dmsTagRow & rowMask;
|
||||
U32 matchBuffer[32 /* maximum nb row entries */];
|
||||
size_t numMatches = 0;
|
||||
size_t currMatch = 0;
|
||||
|
|
|
@ -92,6 +92,72 @@
|
|||
.advanced_api_only = 1, \
|
||||
};
|
||||
|
||||
/* Define a config specifically to test row hash based levels and settings.
|
||||
*/
|
||||
#define ROW_LEVEL(x, y) \
|
||||
param_value_t const row_##y##_level_##x##_param_values[] = { \
|
||||
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
|
||||
{.param = ZSTD_c_compressionLevel, .value = x}, \
|
||||
}; \
|
||||
param_value_t const row_##y##_level_##x##_param_values_dms[] = { \
|
||||
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
|
||||
{.param = ZSTD_c_compressionLevel, .value = x}, \
|
||||
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
|
||||
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceAttach}, \
|
||||
}; \
|
||||
param_value_t const row_##y##_level_##x##_param_values_dds[] = { \
|
||||
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
|
||||
{.param = ZSTD_c_compressionLevel, .value = x}, \
|
||||
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 1}, \
|
||||
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceAttach}, \
|
||||
}; \
|
||||
param_value_t const row_##y##_level_##x##_param_values_dictcopy[] = { \
|
||||
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
|
||||
{.param = ZSTD_c_compressionLevel, .value = x}, \
|
||||
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
|
||||
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceCopy}, \
|
||||
}; \
|
||||
param_value_t const row_##y##_level_##x##_param_values_dictload[] = { \
|
||||
{.param = ZSTD_c_useRowMatchFinder, .value = y}, \
|
||||
{.param = ZSTD_c_compressionLevel, .value = x}, \
|
||||
{.param = ZSTD_c_enableDedicatedDictSearch, .value = 0}, \
|
||||
{.param = ZSTD_c_forceAttachDict, .value = ZSTD_dictForceLoad}, \
|
||||
}; \
|
||||
config_t const row_##y##_level_##x = { \
|
||||
.name = "level " #x " row " #y, \
|
||||
.cli_args = "-" #x, \
|
||||
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values), \
|
||||
.advanced_api_only = 1, \
|
||||
}; \
|
||||
config_t const row_##y##_level_##x##_dict_dms = { \
|
||||
.name = "level " #x " row " #y " with dict dms", \
|
||||
.cli_args = "-" #x, \
|
||||
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dms), \
|
||||
.use_dictionary = 1, \
|
||||
.advanced_api_only = 1, \
|
||||
}; \
|
||||
config_t const row_##y##_level_##x##_dict_dds = { \
|
||||
.name = "level " #x " row " #y " with dict dds", \
|
||||
.cli_args = "-" #x, \
|
||||
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dds), \
|
||||
.use_dictionary = 1, \
|
||||
.advanced_api_only = 1, \
|
||||
}; \
|
||||
config_t const row_##y##_level_##x##_dict_copy = { \
|
||||
.name = "level " #x " row " #y" with dict copy", \
|
||||
.cli_args = "-" #x, \
|
||||
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dictcopy), \
|
||||
.use_dictionary = 1, \
|
||||
.advanced_api_only = 1, \
|
||||
}; \
|
||||
config_t const row_##y##_level_##x##_dict_load = { \
|
||||
.name = "level " #x " row " #y " with dict load", \
|
||||
.cli_args = "-" #x, \
|
||||
.param_values = PARAM_VALUES(row_##y##_level_##x##_param_values_dictload), \
|
||||
.use_dictionary = 1, \
|
||||
.advanced_api_only = 1, \
|
||||
};
|
||||
|
||||
#define PARAM_VALUES(pv) \
|
||||
{ .data = pv, .size = sizeof(pv) / sizeof((pv)[0]) }
|
||||
|
||||
|
@ -99,6 +165,7 @@
|
|||
|
||||
#undef LEVEL
|
||||
#undef FAST_LEVEL
|
||||
#undef ROW_LEVEL
|
||||
|
||||
static config_t no_pledged_src_size = {
|
||||
.name = "no source size",
|
||||
|
@ -243,7 +310,9 @@ static config_t const* g_configs[] = {
|
|||
|
||||
#define FAST_LEVEL(x) &level_fast##x, &level_fast##x##_dict,
|
||||
#define LEVEL(x) &level_##x, &level_##x##_dict, &level_##x##_dict_dms, &level_##x##_dict_dds, &level_##x##_dict_copy, &level_##x##_dict_load,
|
||||
#define ROW_LEVEL(x, y) &row_##y##_level_##x, &row_##y##_level_##x##_dict_dms, &row_##y##_level_##x##_dict_dds, &row_##y##_level_##x##_dict_copy, &row_##y##_level_##x##_dict_load,
|
||||
#include "levels.h"
|
||||
#undef ROW_LEVEL
|
||||
#undef LEVEL
|
||||
#undef FAST_LEVEL
|
||||
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
#ifndef FAST_LEVEL
|
||||
# error FAST_LEVEL(x) must be defined
|
||||
#endif
|
||||
#ifndef ROW_LEVEL
|
||||
# error ROW_LEVEL(x, y) must be defined
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The levels are chosen to trigger every strategy in every source size,
|
||||
|
@ -31,12 +34,22 @@ LEVEL(1)
|
|||
|
||||
LEVEL(3)
|
||||
LEVEL(4)
|
||||
/* ROW_LEVEL triggers the row hash (force enabled and disabled) with different
|
||||
* dictionary strategies, and 16/32 row entries based on the level/searchLog.
|
||||
* 1 == disabled, 2 == enabled.
|
||||
*/
|
||||
ROW_LEVEL(5, 1)
|
||||
ROW_LEVEL(5, 2)
|
||||
LEVEL(5)
|
||||
LEVEL(6)
|
||||
ROW_LEVEL(7, 1)
|
||||
ROW_LEVEL(7, 2)
|
||||
LEVEL(7)
|
||||
|
||||
LEVEL(9)
|
||||
|
||||
ROW_LEVEL(12, 1)
|
||||
ROW_LEVEL(12, 2)
|
||||
LEVEL(13)
|
||||
|
||||
LEVEL(16)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue