mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Use thread_local compiler specifics
Much faster then pthread_getspecific() but still a speed regression against the original code. Following are the nps on a bench: Position 454165 454838 455433 tls 441046 442767 442767 ms (Win) 450521 447510 451105 ms (pthread) 422115 422115 424276 Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -895,8 +895,8 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
|
||||
}
|
||||
|
||||
// Prefetch pawn and material hash tables
|
||||
prefetch((char*)Threads.this_thread()->pawnTable.entries[st->pawnKey]);
|
||||
prefetch((char*)Threads.this_thread()->materialTable.entries[st->materialKey]);
|
||||
prefetch((char*)this_thread->pawnTable.entries[st->pawnKey]);
|
||||
prefetch((char*)this_thread->materialTable.entries[st->materialKey]);
|
||||
|
||||
// Update incremental scores
|
||||
st->psqScore += psq_delta(piece, from, to);
|
||||
|
||||
Reference in New Issue
Block a user