mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 19:16:49 +08:00
Move depth computation out of fail low loop
In root_search() we can compute depth at the beginning once and for all. Spotted by Ralph Stoesser. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -715,6 +715,7 @@ namespace {
|
||||
alpha = *alphaPtr;
|
||||
beta = *betaPtr;
|
||||
isCheck = pos.is_check();
|
||||
depth = (Iteration - 2) * OnePly + InitialDepth;
|
||||
|
||||
// Step 1. Initialize node (polling is omitted at root)
|
||||
ss->currentMove = ss->bestMove = MOVE_NONE;
|
||||
@@ -764,7 +765,6 @@ namespace {
|
||||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||
|
||||
// Step 11. Decide the new search depth
|
||||
depth = (Iteration - 2) * OnePly + InitialDepth;
|
||||
ext = extension<PV>(pos, move, captureOrPromotion, moveIsCheck, false, false, &dangerous);
|
||||
newDepth = depth + ext;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user