mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 09:47:46 +00:00
6cf28d4aa7
In MovePicker we get the next move with pick_move_from_list(), then check if the return value is equal to MOVE_NONE and in this case we update the state to the new phase. This patch reorders the flow so that now from pick_move_from_list() renamed get_next_move() we directly call go_next_phase() to generate and sort the next bunch of moves when there are no more move to try. This avoids to always check for pick_move_from_list() returned value and the flow is more linear and natural. Also use a local variable instead of a pointer dereferencing in a time critical switch statement in get_next_move() With this patch alone we have an incredible speed up of 3.2% !!! No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>