mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
Make key_after() more consistent with key()
STC: https://tests.stockfishchess.org/tests/view/62f8547123d42b50a8dac674 LLR: 2.95 (-2.94,2.94) <0.00,2.00> Total: 176640 W: 47699 L: 47189 D: 81752 Ptnml(0-2): 776, 18599, 49129, 18971, 845 A bug fix plus non functional speed optimization. Position::key_after(Move m) is now consistent with Position::key() thus prefetching correct TT entries which speeds things up. Related PR #3759 closes https://github.com/official-stockfish/Stockfish/pull/4130 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
15ac117ac4
commit
02ef1f4496
+4
-1
@@ -1054,7 +1054,10 @@ Key Position::key_after(Move m) const {
|
||||
if (captured)
|
||||
k ^= Zobrist::psq[captured][to];
|
||||
|
||||
return k ^ Zobrist::psq[pc][to] ^ Zobrist::psq[pc][from];
|
||||
k ^= Zobrist::psq[pc][to] ^ Zobrist::psq[pc][from];
|
||||
|
||||
return (captured || type_of(pc) == PAWN)
|
||||
? k : adjust_key50<true>(k);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user