Skip to content

Commit a29ce3c

Browse files
vondelelantonov
authored andcommitted
Remove unneeded branch
Storing unconditionally the current generation and bound is equivalent to master. Part of the condition was added as a speed optimization in official-stockfish#429. Here the branch is fully eliminated. passed STC single-threaded: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 73515 W: 16378 L: 16359 D: 40778 http://tests.stockfishchess.org/tests/view/5b2fc38c0ebc5902b2e57fd5 passed STC multi-threaded: LLR: 2.95 (-2.94,2.94) [-3.00,1.00] Total: 63725 W: 12916 L: 12874 D: 37935 http://tests.stockfishchess.org/tests/view/5b307b8f0ebc5902b2e5895f The multithreaded test was run after a plausible suggestion by @mstembera that the effect of this could be larger with many cores. The result seems to indicate this doesn't really matter on the 8core architecture abundantly available on fishtest. No functional change
1 parent 5a664b6 commit a29ce3c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tt.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ TTEntry* TranspositionTable::probe(const Key key, bool& found) const {
119119
for (int i = 0; i < ClusterSize; ++i)
120120
if (!tte[i].key16 || tte[i].key16 == key16)
121121
{
122-
if ((tte[i].genBound8 & 0xFC) != generation8 && tte[i].key16)
123-
tte[i].genBound8 = uint8_t(generation8 | tte[i].bound()); // Refresh
122+
tte[i].genBound8 = uint8_t(generation8 | tte[i].bound()); // Refresh
124123

125124
return found = (bool)tte[i].key16, &tte[i];
126125
}

0 commit comments

Comments
 (0)