From 68fbb1e0522056e0ab8062fe68c26b3af5cffed3 Mon Sep 17 00:00:00 2001 From: mstembera Date: Tue, 15 Sep 2015 13:28:42 -0700 Subject: [PATCH 1/1] 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 --- src/tt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.39.2