mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 07:36:23 +08:00
Prefetch also material tables
Prefetch both pawn and material tables in do_move() and prefetch always, not only after a pawn move or a capture. Speed up of 0,7% No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -885,7 +885,6 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
|
||||
|
||||
// Update pawn hash key and prefetch in L1/L2 cache
|
||||
st->pawnKey ^= zobrist[us][PAWN][from] ^ zobrist[us][PAWN][to];
|
||||
prefetchPawn(st->pawnKey, threadID);
|
||||
|
||||
// Set en passant square, only if moved pawn can be captured
|
||||
if ((to ^ from) == 16)
|
||||
@@ -938,6 +937,9 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
|
||||
}
|
||||
}
|
||||
|
||||
// Prefetch pawn and material hash tables
|
||||
prefetchTables(st->pawnKey, st->materialKey, threadID);
|
||||
|
||||
// Update incremental scores
|
||||
st->value += pst_delta(piece, from, to);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user