From 4502917665d50394ead903d0b82c6e7b4777b99d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 27 Nov 2012 20:05:03 +0100 Subject: [PATCH 1/1] Don't double check for move legality In case of a RootNode or a SpNode move has been already checked for legality so we can skip a redundant check. Spotted by Frank Genot. No functional change. --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 3116e80e..da20f15e 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -893,7 +893,7 @@ split_point_start: // At split points actual search starts from here } // Check for legality only before to do the move - if (!pos.pl_move_is_legal(move, ci.pinned)) + if (!RootNode && !SpNode && !pos.pl_move_is_legal(move, ci.pinned)) { moveCount--; continue; -- 2.39.2