From ce1c260ea97c14eea996d0a2638f4876ccbc412b Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 9 Jun 2014 04:56:31 +0900 Subject: [PATCH] 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. --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 5cdc0169..e24d264d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -980,8 +980,8 @@ moves_loop: // When in check and at SpNode search starts from here // Step 19. Check for splitting the search if ( !SpNode - && Threads.size() >= 2 && depth >= Threads.minimumSplitDepth + && Threads.available_slave(thisThread) && ( !thisThread->activeSplitPoint || !thisThread->activeSplitPoint->allSlavesSearching) && thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD) -- 2.39.2