mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
20224a5bbf
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>