mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
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 #429
This commit is contained in:
@@ -78,7 +78,7 @@ TTEntry* TranspositionTable::probe(const Key key, bool& found) const {
|
|||||||
for (int i = 0; i < ClusterSize; ++i)
|
for (int i = 0; i < ClusterSize; ++i)
|
||||||
if (!tte[i].key16 || tte[i].key16 == key16)
|
if (!tte[i].key16 || tte[i].key16 == key16)
|
||||||
{
|
{
|
||||||
if (tte[i].key16)
|
if ((tte[i].genBound8 & 0xFC) != generation8 && tte[i].key16)
|
||||||
tte[i].genBound8 = uint8_t(generation8 | tte[i].bound()); // Refresh
|
tte[i].genBound8 = uint8_t(generation8 | tte[i].bound()); // Refresh
|
||||||
|
|
||||||
return found = (bool)tte[i].key16, &tte[i];
|
return found = (bool)tte[i].key16, &tte[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user