Skip to content

Commit f145226

Browse files
mstemberamstembera
authored andcommitted
Reduce writes in TT::probe().
Only refresh TT entry when it's really necessary. This should give a small speed boost for some machines. And it's a risk-free change. No functional change. Resolves official-stockfish#429
1 parent 95b93f8 commit f145226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ TTEntry* TranspositionTable::probe(const Key key, bool& found) const {
7878
for (int i = 0; i < ClusterSize; ++i)
7979
if (!tte[i].key16 || tte[i].key16 == key16)
8080
{
81-
if (tte[i].key16)
81+
if ((tte[i].genBound8 & 0xFC) != generation8 && tte[i].key16)
8282
tte[i].genBound8 = uint8_t(generation8 | tte[i].bound()); // Refresh
8383

8484
return found = (bool)tte[i].key16, &tte[i];

0 commit comments

Comments
 (0)