From: Marco Costalba Date: Mon, 18 Jan 2010 14:47:43 +0000 (+0100) Subject: Avoid an useless evaluate() call X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=0edad63b440a81f764efd168b0bd5733850095ae Avoid an useless evaluate() call Now that we have position static score we don't need to call evaluate() a second time. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 403c9363..76a4e7a9 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1457,7 +1457,7 @@ namespace { // Go with internal iterative deepening if we don't have a TT move if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly && - !isCheck && evaluate(pos, ei, threadID) >= beta - IIDMargin) + !isCheck && ss[ply].eval >= beta - IIDMargin) { search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID); ttMove = ss[ply].pv[ply];