mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Small speedup in futility_move_count
The speedup is around 0.25% using gcc 11.3.1 (bmi2, nnue bench, depth 16 and 23) while it is neutral using clang (same conditions). According to `perf` that integer division was one of the most time-consuming instructions in search (gcc disassembly). Passed STC: https://tests.stockfishchess.org/tests/view/628a17fe24a074e5cd59b3aa LLR: 2.94 (-2.94,2.94) <0.00,2.50> Total: 22232 W: 5992 L: 5751 D: 10489 Ptnml(0-2): 88, 2235, 6218, 2498, 77 yellow LTC: https://tests.stockfishchess.org/tests/view/628a35d7ccae0450e35106f7 LLR: -2.95 (-2.94,2.94) <0.50,3.00> Total: 320168 W: 85853 L: 85326 D: 148989 Ptnml(0-2): 185, 29698, 99821, 30165, 215 This patch also suggests that UHO STC is sensible to small speedups (< 0.50%). closes https://github.com/official-stockfish/Stockfish/pull/4032 No functional change
This commit is contained in:
parent
48df0754bc
commit
1a168201bd
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ namespace {
|
|||
}
|
||||
|
||||
constexpr int futility_move_count(bool improving, Depth depth) {
|
||||
return (3 + depth * depth) / (2 - improving);
|
||||
return improving ? (3 + depth * depth)
|
||||
: (3 + depth * depth) / 2;
|
||||
}
|
||||
|
||||
// History and stats update bonus, based on depth
|
||||
|
|
Loading…
Add table
Reference in a new issue