History stat bonus: Move condition to bonus calculation

about 0.5% speedup.

No functional change

Closes #1034
This commit is contained in:
Joost VandeVondele
2017-03-17 14:45:27 -07:00
committed by Joona Kiiski
parent c076216a32
commit c80d52c845
2 changed files with 1 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ namespace {
// History and stats update bonus, based on depth
Value stat_bonus(Depth depth) {
int d = depth / ONE_PLY ;
return Value(d * d + 2 * d - 2);
return d > 17 ? VALUE_ZERO : Value(d * d + 2 * d - 2);
}
// Skill structure is used to implement strength limit