From cdf1f23bc5770c5d9e109dd254dcc54eee383464 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 10 Nov 2008 13:56:49 +0100 Subject: [PATCH] Micro optimization of update_history() Remove an useless comparison. Signed-off-by: Marco Costalba --- src/search.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index e2032638..5b4913c3 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2174,8 +2174,11 @@ namespace { H.success(pos.piece_on(move_from(m)), m, depth); for (int i = 0; i < moveCount - 1; i++) - if (ok_to_history(pos, movesSearched[i]) && m != movesSearched[i]) + { + assert(m != movesSearched[i]); + if (ok_to_history(pos, movesSearched[i])) H.failure(pos.piece_on(move_from(movesSearched[i])), movesSearched[i]); + } } // fail_high_ply_1() checks if some thread is currently resolving a fail -- 2.39.2