1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 09:39:36 +00:00

[cluster] Add depth condition to cluster TT saves.

since the logic for saving moves in the sendbuffer and the associated rehashing is expensive, only do it for TT stores of sufficient depth.

quite some gain in local testing with 4 ranks against the previous version.
Elo difference: 288.84 +/- 21.98

This starts to make the branch useful, but for on-node runs, difference remains to the standard threading.
This commit is contained in:
Joost VandeVondele 2018-12-05 07:26:08 +01:00 committed by Stéphane Nicolet
parent 66b2c6b9f1
commit 271181bb31

View file

@ -175,8 +175,11 @@ int rank() {
void save(Thread* thread, TTEntry* tte,
Key k, Value v, Bound b, Depth d, Move m, Value ev) {
tte->save(k, v, b, d, m, ev);
if (d > 5 * ONE_PLY)
{
// Try to add to thread's send buffer
{
std::lock_guard<Mutex> lk(thread->ttBuffer.mutex);
@ -221,6 +224,7 @@ void save(Thread* thread, TTEntry* tte,
TTComm, &req);
}
}
}
}
void pick_moves(MoveInfo& mi) {