Believed to be a speed optimization as benched
on Windows with bench realtime affinity 0x1 deleting
highest and lowest runs:
Base Test
1549259 1608202
1538115 1583934
1543168 1556938
1536365 1554179
1533026 1582010
Signature remains unchanged and gives anywhere from 1-2% nps
boost in analysis depending on number of cores used.
No functional change.
it->value = PieceValue[MG][pos.piece_on(to_sq(m))]
- Value(type_of(pos.moved_piece(m)));
- if (type_of(m) == PROMOTION)
- it->value += PieceValue[MG][promotion_type(m)] - PieceValue[MG][PAWN];
-
- else if (type_of(m) == ENPASSANT)
+ if (type_of(m) == ENPASSANT)
it->value += PieceValue[MG][PAWN];
+
+ else if (type_of(m) == PROMOTION)
+ it->value += PieceValue[MG][promotion_type(m)] - PieceValue[MG][PAWN];
}
}