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:
Marco Costalba
2009-03-02 17:32:30 +01:00
parent c02613860a
commit 772a37cd54
2 changed files with 14 additions and 6 deletions

View File

@@ -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;
};