]> git.sesse.net Git - stockfish/commit
Delay costly SEE call during captures ordering in MovePicker
authorMarco Costalba <mcostalba@gmail.com>
Thu, 23 Jul 2009 06:13:06 +0000 (07:13 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 24 Jul 2009 13:12:33 +0000 (14:12 +0100)
commit20224a5bbf2844b5b64eec1de199c2d51b8d93d4
treee19e8c96f2eabff963dd188f5880bc365f169a56
parent8654fee18cfc503361d621ccd127a6444e931d25
Delay costly SEE call during captures ordering in MovePicker

When ordering moves we push all captures with negative SEE values
to badCaptures[] array during the scoring phase.

This patch delays the costly SEE call up to when the move has been
picked up in pick_move_from_list(), this way we save some SEE calls
in case we get a cutoff.

It seems we have a speed gain of about 1-1.5 % in terms of nodes/sec
and profiling seems to confirm the small but real speed increase.

Idea from Pablo Vazquez on talkchess.com
http://www.talkchess.com/forum/viewtopic.php?t=29018&start=20

It would be a no functional change but actually it is not because
now sorting set is different and so std::sort(), that is not a
stable sort, does not guarantees the order of same scored moves to
remain the same as before.

After 952 games at 1+0 we are below error bar, almost equal just
6 games of difference (+2 ELO)

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