Micro optimization of update_history()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 10 Nov 2008 12:56:49 +0000 (13:56 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 10 Nov 2008 18:19:40 +0000 (19:19 +0100)
Remove an useless comparison.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index e2032638b8650ce112968c4329ea4b08e77ee10e..5b4913c3d3dcdbe733ec30c92e8f90f152843c7a 100644 (file)
@@ -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