1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00: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:
Marco Costalba 2014-06-09 04:56:31 +09:00
parent 4d30126e4b
commit ce1c260ea9

View file

@ -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)