]> git.sesse.net Git - stockfish/commit
Use spinlock instead of mutex for Threads and SplitPoint
authorMarco Costalba <mcostalba@gmail.com>
Sun, 22 Feb 2015 13:59:55 +0000 (14:59 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 23 Feb 2015 12:47:07 +0000 (13:47 +0100)
commit38112060dc2da351c6dde8f12d0ee5cfaeac5084
tree630906bd6924972be70825c26f9ee479b260ebab
parent775f8239d3bec75c8deaf951ab24d3a030b671ee
Use spinlock instead of mutex for Threads and SplitPoint

It is reported to be defenitly faster with increasing
number of threads, we go from a +3.5% with 4 threads
to a +15% with 16 threads.

The only drawback is that now when testing with more
threads than physical available cores, the speed slows
down to a crawl. This is expected and was similar at what
we had setting the old sleepingThreads to false.

No functional change.
src/search.cpp
src/thread.cpp
src/thread.h