mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Per-thread TB hit counters
Use a per-thread counter to reduce contention with many cores and endgame positions. Measured around 1% speed-up on a 12 core and 8% on 28 cores with 6-men, searching on: 7R/1p3k2/2p2P2/3nR1P1/8/3b1P2/7K/r7 b - - 3 38 Also retire the unused set_nodes_searched() and fix a couple of return types and naming conventions. No functional change.
This commit is contained in:
@@ -148,7 +148,6 @@ public:
|
||||
bool is_chess960() const;
|
||||
Thread* this_thread() const;
|
||||
uint64_t nodes_searched() const;
|
||||
void set_nodes_searched(uint64_t n);
|
||||
bool is_draw() const;
|
||||
int rule50_count() const;
|
||||
Score psq_score() const;
|
||||
@@ -341,10 +340,6 @@ inline uint64_t Position::nodes_searched() const {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
inline void Position::set_nodes_searched(uint64_t n) {
|
||||
nodes = n;
|
||||
}
|
||||
|
||||
inline bool Position::opposite_bishops() const {
|
||||
return pieceCount[W_BISHOP] == 1
|
||||
&& pieceCount[B_BISHOP] == 1
|
||||
|
||||
Reference in New Issue
Block a user