mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Micro optimize copy of new state in do_move()
Instead of copying all, copy only the fields that are updated incrementally, not the ones that are recalcuated form scratch anyway. This reduces copy overhead of 30%. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -79,14 +79,15 @@ enum CastleRights {
|
||||
/// must be passed as a parameter.
|
||||
|
||||
struct StateInfo {
|
||||
Bitboard checkersBB;
|
||||
Key key, pawnKey, materialKey;
|
||||
int castleRights, rule50;
|
||||
Square epSquare;
|
||||
Value mgValue, egValue;
|
||||
|
||||
PieceType capture;
|
||||
StateInfo* previous;
|
||||
Bitboard checkersBB;
|
||||
Move lastMove;
|
||||
StateInfo* previous;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user