Do not copy the whole old state in do_move()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 23 Feb 2009 11:06:06 +0000 (12:06 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Feb 2009 20:44:29 +0000 (21:44 +0100)
commitda7a62852ab5e96d24bb4fd2f062d488684738b1
tree88f75bffad092cdd706d381bdc7ce22bef1ee7c0
parent0bf45823da3d76d25d0e3cfdf131bf8823ecb58e
Do not copy the whole old state in do_move()

Instead of copy the old state in the new one, copy only
fields that will be updated incrementally, not the ones
that will be recalculcated anyway.

This let us copy 13 bytes instead of 28 for each do_move()
call.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.cpp
src/position.h