mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Revert thread_local stuff
Unfortunatly accessing thread local variable is much slower than object data (see previous patch log msg), so we have to revert to old code to avoid speed regression. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -371,7 +371,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||
margins[WHITE] = margins[BLACK] = VALUE_ZERO;
|
||||
|
||||
// Probe the material hash table
|
||||
ei.mi = this_thread->materialTable.probe(pos);
|
||||
ei.mi = pos.this_thread()->materialTable.probe(pos);
|
||||
score += ei.mi->material_value();
|
||||
|
||||
// If we have a specialized evaluation function for the current material
|
||||
@@ -383,7 +383,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||
}
|
||||
|
||||
// Probe the pawn hash table
|
||||
ei.pi = this_thread->pawnTable.probe(pos);
|
||||
ei.pi = pos.this_thread()->pawnTable.probe(pos);
|
||||
score += ei.pi->pawns_value();
|
||||
|
||||
// Initialize attack and king safety bitboards
|
||||
|
||||
Reference in New Issue
Block a user