mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 20:57:10 +00:00
Use huge pages for worker data
As the worker data is quite large (28MB after #6350) we can make use of huge pages as a speedup. prior to #6350 STC passed elo gaining bounds: LLR: 2.95 (-2.94,2.94) <0.00,2.00> Total: 166272 W: 43479 L: 42993 D: 79800 Ptnml(0-2): 540, 17598, 46365, 18102, 531 https://tests.stockfishchess.org/tests/view/68e9f3c0d323fd15c04e3ba4 Tested the speedup on a large machine with speedtest: ==== master ==== Average (over 20): 288644510 ==== largePageWorker ==== Average (over 20): 292082422 Test after #6350: ==== rustam-cpp-testPR ==== Average (over 20): 291035351 ==== rustam-cpp-testPR-pages ==== Average (over 20): 291937367 https://github.com/official-stockfish/Stockfish/pull/6359 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
315f8ba4bf
commit
75edbee01e
+3
-2
@@ -28,6 +28,7 @@
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "memory.h"
|
||||
#include "numa.h"
|
||||
#include "position.h"
|
||||
#include "search.h"
|
||||
@@ -93,8 +94,8 @@ class Thread {
|
||||
void wait_for_search_finished();
|
||||
size_t id() const { return idx; }
|
||||
|
||||
std::unique_ptr<Search::Worker> worker;
|
||||
std::function<void()> jobFunc;
|
||||
LargePagePtr<Search::Worker> worker;
|
||||
std::function<void()> jobFunc;
|
||||
|
||||
private:
|
||||
std::mutex mutex;
|
||||
|
||||
Reference in New Issue
Block a user