X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=efaf9928213f7b2aa06e80c4a4d197d80322bb75;hp=41fc33ff9ebba868927ce1de876ab42f512b2618;hb=4833887842f3e43153306799ecc8f8a3d181f3b0;hpb=ffdf63ff7c1fce40774aa8cff82b17c54155c6cb diff --git a/src/tt.cpp b/src/tt.cpp index 41fc33ff..efaf9928 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -94,7 +94,6 @@ const TTEntry* TranspositionTable::probe(const Key key) const { void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m, Value statV) { - int c1, c2, c3; TTEntry *tte, *replace; uint32_t key32 = key >> 32; // Use the high 32 bits as key inside the cluster @@ -112,11 +111,9 @@ void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m, } // Implement replace strategy - c1 = (replace->generation8 == generation ? 2 : 0); - c2 = (tte->generation8 == generation || tte->bound() == BOUND_EXACT ? -2 : 0); - c3 = (tte->depth16 < replace->depth16 ? 1 : 0); - - if (c1 + c2 + c3 > 0) + if ( ( tte->generation8 == generation || tte->bound() == BOUND_EXACT) + - (replace->generation8 == generation) + < (tte->depth16 < replace->depth16)) replace = tte; }