]> git.sesse.net Git - stockfish/commit
Use an homegrown insertion sort instead of std::sort()
authorMarco Costalba <mcostalba@gmail.com>
Thu, 15 Oct 2009 11:08:39 +0000 (13:08 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 17 Oct 2009 08:24:58 +0000 (09:24 +0100)
commit4dd7fccfd18a809cf1e3b589c2ec77f4b386dad6
treedd1d4590532635e6074a9eb60fe5c143b50efabe
parentc1ea5ed6f7204afd6cb03a80ca8d124bd82cc40d
Use an homegrown insertion sort instead of std::sort()

It is stable and it is also a bit faster then std::sort()
on the tipical small move lists that we need to handle.

Verified to have same functionality of std::stable_sort()

After 999 games at 1+0
Mod vs Orig +240 =534 -225 50.75%  507.0/999  +5 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/move.h
src/movepick.cpp