From 060eef4f4e97ea1261252256c6768b243b7d3de5 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 23 Sep 2008 13:03:44 +0200 Subject: [PATCH] Do not use evaluate() for razoring Because razoring is reached 10% of times and about 50% of time first two conditions are met we can save 5% of calls to the fairly costly evaluate(). On the other side statistics have shown 95% of nodes that pass the first two razoring conditions pass also the evaluate() test. So the risk of dropping the third condition seems low enough. Testing seems to validate this. Signed-off-by: Marco Costalba --- src/search.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 88d3e8a0..c2974dcf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1122,9 +1122,7 @@ namespace { } } // Null move search not allowed, try razoring - else if ( depth < RazorDepth - && approximateEval < beta - RazorMargin - && evaluate(pos, ei, threadID) < beta - RazorMargin) + else if (depth < RazorDepth && approximateEval < beta - RazorMargin) { Value v = qsearch(pos, ss, beta-1, beta, Depth(0), ply, threadID); if (v < beta) -- 2.39.2