mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 14:27:45 +00:00
Optimize futilityValue calculation
Avoid calling evaluate() if we already have the score in TT No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1333,6 +1333,10 @@ namespace {
|
|||||||
bool useFutilityPruning = depth < SelectiveDepth
|
bool useFutilityPruning = depth < SelectiveDepth
|
||||||
&& !isCheck;
|
&& !isCheck;
|
||||||
|
|
||||||
|
// Avoid calling evaluate() if we already have the score in TT
|
||||||
|
if (tte && (tte->type() & VALUE_TYPE_EVAL))
|
||||||
|
futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2];
|
||||||
|
|
||||||
// Loop through all legal moves until no moves remain or a beta cutoff
|
// Loop through all legal moves until no moves remain or a beta cutoff
|
||||||
// occurs.
|
// occurs.
|
||||||
while ( bestValue < beta
|
while ( bestValue < beta
|
||||||
|
|||||||
Reference in New Issue
Block a user