]> git.sesse.net Git - stockfish/commitdiff
Micro-optimize castleRights update
authorMarco Costalba <mcostalba@gmail.com>
Sat, 18 Feb 2012 20:30:33 +0000 (21:30 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 19 Feb 2012 09:04:49 +0000 (10:04 +0100)
When updating castleRights in do_move() perform only one
64bit xor with zobCastle[] instead of two.

The trick here is to define zobCastle[] keys of composite
castling rights as a xor combination of the keys of the
single castling rights, instead of 16 independent keys.

Idea from Critter although implementation is different.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found