From: mstembera Date: Tue, 15 Sep 2015 20:28:42 +0000 (-0700) Subject: Reduce writes in TT::probe(). X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=68fbb1e0522056e0ab8062fe68c26b3af5cffed3;hp=01fab4d432b50f95f9def1b757d854fd0c385224 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 --- diff --git a/src/tt.cpp b/src/tt.cpp index f9674601..0c77d6b2 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -78,7 +78,7 @@ TTEntry* TranspositionTable::probe(const Key key, bool& found) const { for (int i = 0; i < ClusterSize; ++i) 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 return found = (bool)tte[i].key16, &tte[i];