Skip to content

Commit ce1c260

Browse files
committed
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.
1 parent 4d30126 commit ce1c260

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/search.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,8 @@ namespace {
980980

981981
// Step 19. Check for splitting the search
982982
if ( !SpNode
983-
&& Threads.size() >= 2
984983
&& depth >= Threads.minimumSplitDepth
984+
&& Threads.available_slave(thisThread)
985985
&& ( !thisThread->activeSplitPoint
986986
|| !thisThread->activeSplitPoint->allSlavesSearching)
987987
&& thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)

0 commit comments

Comments
 (0)