X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=b513871a2fa2820004ea719ed2dec82c015857cd;hp=58b60c878d872f986157e84a823386a40b33a0d5;hb=a6c60378136b865f4a07a4ced22fc0484ababd2c;hpb=e677185567173a0b50f0ca47bd2496c5f814dab4 diff --git a/src/search.cpp b/src/search.cpp index 58b60c87..b513871a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1333,6 +1333,10 @@ namespace { bool useFutilityPruning = depth < SelectiveDepth && !isCheck; + // Avoid calling evaluate() if we already have the score in TT + if (tte && (tte->type() & VALUE_TYPE_EVAL)) + futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2]; + // Loop through all legal moves until no moves remain or a beta cutoff // occurs. while ( bestValue < beta