Move Prefetch Before Insertion; Speed Up ~6%

This commit is contained in:
W. Felix Handte
2020-09-10 18:51:52 -04:00
parent eede46a47e
commit a494111385
+3 -3
View File
@@ -531,14 +531,14 @@ size_t ZSTD_HcFindBestMatch_generic (
U32 matchIndex;
/* HC4 match finder */
matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls);
if (dictMode == ZSTD_dedicatedDictSearch) {
const U32* entry = &dms->hashTable[ddsIdx];
PREFETCH_L1(entry);
}
/* HC4 match finder */
matchIndex = ZSTD_insertAndFindFirstIndex_internal(ms, cParams, ip, mls);
for ( ; (matchIndex>lowLimit) & (nbAttempts>0) ; nbAttempts--) {
size_t currentMl=0;
if ((dictMode != ZSTD_extDict) || matchIndex >= dictLimit) {