mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08: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
|
||||
&& !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
|
||||
// occurs.
|
||||
while ( bestValue < beta
|
||||
|
||||
Reference in New Issue
Block a user