mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Check for an available slave early on
Don't take the split lock if we don't have available slaves (about 30-40% of times). This new condition allows to retire the now redundant one on number of threads. No functional change.
This commit is contained in:
@@ -980,8 +980,8 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||||||
|
|
||||||
// Step 19. Check for splitting the search
|
// Step 19. Check for splitting the search
|
||||||
if ( !SpNode
|
if ( !SpNode
|
||||||
&& Threads.size() >= 2
|
|
||||||
&& depth >= Threads.minimumSplitDepth
|
&& depth >= Threads.minimumSplitDepth
|
||||||
|
&& Threads.available_slave(thisThread)
|
||||||
&& ( !thisThread->activeSplitPoint
|
&& ( !thisThread->activeSplitPoint
|
||||||
|| !thisThread->activeSplitPoint->allSlavesSearching)
|
|| !thisThread->activeSplitPoint->allSlavesSearching)
|
||||||
&& thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)
|
&& thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)
|
||||||
|
|||||||
Reference in New Issue
Block a user