From 0edad63b440a81f764efd168b0bd5733850095ae Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 18 Jan 2010 15:47:43 +0100 Subject: [PATCH] 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 --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.39.2