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)
commit821e1c72337e435d805aa2e29743d8b79c9d65a9
tree534526c4d97a53c85da98b109ffc00b9a8a04bb8
parent6088ac210883c272832360f28c8922ff1514ef87
Micro-optimize castleRights update

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>
src/position.cpp