1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Do more work between prefetch and querying transposition table

More time to load the cache line before access

No functional change.
This commit is contained in:
jundery 2013-03-11 08:18:15 -06:00 committed by Marco Costalba
parent a24da071f0
commit ccf4ec6768

View 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