From: Marco Costalba Date: Sun, 30 Jun 2013 09:35:03 +0000 (+0200) Subject: Reorder conditions according to their frequency X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=92dcbfa658a66ccc633ff24dd3402f90451712ed;ds=sidebyside Reorder conditions according to their frequency This should minimize useless tests. No functional change. --- diff --git a/src/search.cpp b/src/search.cpp index 15981755..7b7bc5cd 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -614,10 +614,10 @@ namespace { // Update gain for the parent non-capture move given the static position // evaluation before and after the move. - if ( (move = (ss-1)->currentMove) != MOVE_NULL - && (ss-1)->staticEval != VALUE_NONE + if ( !pos.captured_piece_type() && ss->staticEval != VALUE_NONE - && !pos.captured_piece_type() + && (ss-1)->staticEval != VALUE_NONE + && (move = (ss-1)->currentMove) != MOVE_NULL && type_of(move) == NORMAL) { Square to = to_sq(move);