]> git.sesse.net Git - stockfish/commitdiff
Do more work between prefetch and querying transposition table
authorjundery <jundery@gmail.com>
Mon, 11 Mar 2013 14:18:15 +0000 (08:18 -0600)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 12 Mar 2013 18:58:32 +0000 (19:58 +0100)
More time to load the cache line before access

No functional change.

src/search.cpp

index cff8e768a73693ec3ec29046165602aac7fd404c..7970a393d003848a537f9e4c18650266fd12580d 100644 (file)
@@ -1128,6 +1128,12 @@ split_point_start: // At split points actual search starts from here
     if (pos.is_draw<true>() || ss->ply > MAX_PLY)
         return DrawValue[pos.side_to_move()];
 
+    // Decide whether or not to include checks, this fixes also the type of
+    // TT entry depth that we are going to use. Note that in qsearch we use
+    // only two types of depth in TT: DEPTH_QS_CHECKS or DEPTH_QS_NO_CHECKS.
+    ttDepth = InCheck || depth >= DEPTH_QS_CHECKS ? DEPTH_QS_CHECKS
+                                                  : DEPTH_QS_NO_CHECKS;
+
     // Transposition table lookup. At PV nodes, we don't use the TT for
     // pruning, but only for move ordering.
     posKey = pos.key();
@@ -1135,11 +1141,6 @@ split_point_start: // At split points actual search starts from here
     ttMove = tte ? tte->move() : MOVE_NONE;
     ttValue = tte ? value_from_tt(tte->value(),ss->ply) : VALUE_NONE;
 
-    // Decide whether or not to include checks, this fixes also the type of
-    // TT entry depth that we are going to use. Note that in qsearch we use
-    // only two types of depth in TT: DEPTH_QS_CHECKS or DEPTH_QS_NO_CHECKS.
-    ttDepth = InCheck || depth >= DEPTH_QS_CHECKS ? DEPTH_QS_CHECKS
-                                                  : DEPTH_QS_NO_CHECKS;
     if (   tte
         && tte->depth() >= ttDepth
         && ttValue != VALUE_NONE // Only in case of TT access race