From ccf4ec6768b17f47b48a296978bc19e3eaaa70ba Mon Sep 17 00:00:00 2001 From: jundery Date: Mon, 11 Mar 2013 08:18:15 -0600 Subject: [PATCH] Do more work between prefetch and querying transposition table More time to load the cache line before access No functional change. --- src/search.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index cff8e768..7970a393 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1128,6 +1128,12 @@ split_point_start: // At split points actual search starts from here if (pos.is_draw() || 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 -- 2.39.2