From d297d1d8a78166b609af112b6208ace7c645b2f3 Mon Sep 17 00:00:00 2001 From: xoto10 Date: Wed, 30 Jun 2021 09:22:59 +0100 Subject: [PATCH] Simplify lazy_skip. Small speedup by removing operations in lazy_skip. STC 10+0.1 : LLR: 2.93 (-2.94,2.94) <-2.50,0.50> Total: 55088 W: 4553 L: 4482 D: 46053 Ptnml(0-2): 163, 3546, 20045, 3637, 153 https://tests.stockfishchess.org/tests/view/60daa2cb3beab81350aca04d LTC 60+0.6 : LLR: 2.93 (-2.94,2.94) <-2.50,0.50> Total: 46136 W: 1457 L: 1407 D: 43272 Ptnml(0-2): 10, 1282, 20442, 1316, 18 https://tests.stockfishchess.org/tests/view/60db0e753beab81350aca08e closes https://github.com/official-stockfish/Stockfish/pull/3599 Bench 5122403 --- src/evaluate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f9754795..538214d3 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -190,8 +190,8 @@ using namespace Trace; namespace { // Threshold for lazy and space evaluation - constexpr Value LazyThreshold1 = Value(1565); - constexpr Value LazyThreshold2 = Value(1102); + constexpr Value LazyThreshold1 = Value(3130); + constexpr Value LazyThreshold2 = Value(2204); constexpr Value SpaceThreshold = Value(11551); // KingAttackWeights[PieceType] contains king attack weights by piece type @@ -986,7 +986,7 @@ namespace { // Early exit if score is high auto lazy_skip = [&](Value lazyThreshold) { - return abs(mg_value(score) + eg_value(score)) / 2 > lazyThreshold + pos.non_pawn_material() / 64; + return abs(mg_value(score) + eg_value(score)) > lazyThreshold + pos.non_pawn_material() / 32; }; if (lazy_skip(LazyThreshold1)) -- 2.39.2