From: Marco Costalba Date: Sun, 8 Jun 2014 19:56:31 +0000 (+0900) Subject: Check for an available slave early on X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=ce1c260ea97c14eea996d0a2638f4876ccbc412b;ds=sidebyside 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. --- 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)