Improve thread voting inefficiencies

Initialize the unordered map to a reasonable
number of buckets and make the move hashes well
distributed. For more see
https://github.com/official-stockfish/Stockfish/pull/4958#issuecomment-1937351190
Also make bestThreadPV and newThreadPV references
so we don't copy entire vectors.

closes https://github.com/official-stockfish/Stockfish/pull/5048

No functional change
This commit is contained in:
mstembera
2024-02-10 15:06:38 -08:00
committed by Disservin
parent 91a4cea437
commit 531747ee78
2 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -397,7 +397,7 @@ class Move {
constexpr std::uint16_t raw() const { return data; }
struct MoveHash {
std::size_t operator()(const Move& m) const { return m.data; }
std::size_t operator()(const Move& m) const { return make_key(m.data); }
};
protected: