mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Retire TheirHalf[]
We avoid to use an ad-hoc table at the cost of a relative_rank() call in advanced_pawn_push(). On my 32 bit system it is even slightly faster (on 64bit may be different). This is the speed in nps alternating old and new bench runs: new 368890 368825 369972 old 367798 367635 368026 No functional change.
This commit is contained in:
@@ -327,7 +327,8 @@ inline bool Position::pawn_passed(Color c, Square s) const {
|
||||
}
|
||||
|
||||
inline bool Position::advanced_pawn_push(Move m) const {
|
||||
return pieces(PAWN) & TheirHalf[sideToMove] & from_sq(m);
|
||||
return type_of(moved_piece(m)) == PAWN
|
||||
&& relative_rank(sideToMove, from_sq(m)) > RANK_4;
|
||||
}
|
||||
|
||||
inline Key Position::key() const {
|
||||
|
||||
Reference in New Issue
Block a user