mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +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:
@@ -62,6 +62,7 @@ public:
|
||||
Endgames endgames;
|
||||
size_t idx, PVIdx;
|
||||
int maxPly, callsCnt;
|
||||
uint64_t tbHits;
|
||||
|
||||
Position rootPos;
|
||||
Search::RootMoves rootMoves;
|
||||
@@ -98,7 +99,8 @@ struct ThreadPool : public std::vector<Thread*> {
|
||||
MainThread* main() { return static_cast<MainThread*>(at(0)); }
|
||||
void start_thinking(Position&, StateListPtr&, const Search::LimitsType&);
|
||||
void read_uci_options();
|
||||
int64_t nodes_searched();
|
||||
uint64_t nodes_searched();
|
||||
uint64_t tb_hits();
|
||||
|
||||
private:
|
||||
StateListPtr setupStates;
|
||||
|
||||
Reference in New Issue
Block a user