]> git.sesse.net Git - stockfish/commit - src/syzygy/tbprobe.cpp
Use stable sort to make sure bench with TB yields same results everywhere.
authormstembera <MissingEmail@email>
Mon, 31 Aug 2020 01:40:49 +0000 (18:40 -0700)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 1 Sep 2020 07:25:44 +0000 (09:25 +0200)
commita0afe32d16554ff3b5c74f34ae56400f35759edf
tree79983899ec498cda6e8b2c3c7d99fc479b6fde61
parente0bafa1911ede61b9268e0b461a5d8856d6cd6be
Use stable sort to make sure bench with TB yields same results everywhere.

std::sort() is not stable so different implementations can produce different results:
use the stable version instead.

Observed for '8/6k1/5r2/8/8/8/1K6/Q7 w - - 0 1' yielding different bench results for gcc and MSVC
and 3-4-5 syzygy TB prior to this patch.

closes https://github.com/official-stockfish/Stockfish/pull/3083

No functional change.
src/search.cpp
src/syzygy/tbprobe.cpp