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

@@ -39,9 +39,6 @@ struct HistoryStats {
void clear() { std::memset(table, 0, sizeof(table)); }
void update(Color c, Move m, Value v) {
if (abs(int(v)) >= 324)
return;
Square from = from_sq(m);
Square to = to_sq(m);
@@ -68,9 +65,6 @@ struct Stats {
void update(Piece pc, Square to, Move m) { table[pc][to] = m; }
void update(Piece pc, Square to, Value v) {
if (abs(int(v)) >= 324)
return;
table[pc][to] -= table[pc][to] * abs(int(v)) / 936;
table[pc][to] += int(v) * 32;
}