]> git.sesse.net Git - stockfish/commit
Improve multi-threaded mate finding
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 18 Aug 2017 17:38:18 +0000 (19:38 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 26 Aug 2017 07:53:34 +0000 (09:53 +0200)
commitd5f883ab29d43b35746ff605cf13c3722df56041
treee99d967de5a1911d720a1f4f3c914a31dc07a001
parent92c39522b16a5a3285c6225e60cd94987beb5efc
Improve multi-threaded mate finding

If any thread found a 'mate in x' stop the search. Previously only
mainThread would do so. Requires the bestThread selection to be
adjusted to always prefer mate scores, even if the search depth is less.

I've tried to collect some data for this patch. On 30 cores, mate finding
seems 5-30% faster on average. It is not so easy to get numbers for this,
as the time to find a mate fluctuates significantly with multi-threaded runs,
so it is an average over 100 searches for the same position. Furthermore,
hash size and position make a difference as well.

Bench: 5965302
src/search.cpp