mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Avoid an useless evaluate() call
Now that we have position static score we don't need to call evaluate() a second time. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1457,7 +1457,7 @@ namespace {
|
|||||||
|
|
||||||
// Go with internal iterative deepening if we don't have a TT move
|
// Go with internal iterative deepening if we don't have a TT move
|
||||||
if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly &&
|
if (UseIIDAtNonPVNodes && ttMove == MOVE_NONE && depth >= 8*OnePly &&
|
||||||
!isCheck && evaluate(pos, ei, threadID) >= beta - IIDMargin)
|
!isCheck && ss[ply].eval >= beta - IIDMargin)
|
||||||
{
|
{
|
||||||
search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
|
search(pos, ss, beta, Min(depth/2, depth-2*OnePly), ply, false, threadID);
|
||||||
ttMove = ss[ply].pv[ply];
|
ttMove = ss[ply].pv[ply];
|
||||||
|
|||||||
Reference in New Issue
Block a user