mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Do not sort negative non captures at low depth
Speedup of the whole 3 patch series is of 2,5% !! Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ namespace {
|
|||||||
/// move ordering is at the current node.
|
/// move ordering is at the current node.
|
||||||
|
|
||||||
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
|
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
|
||||||
SearchStack* ss, Value beta) : pos(p), H(h) {
|
SearchStack* ss, Value beta) : pos(p), H(h), depth(d) {
|
||||||
captureThreshold = 0;
|
captureThreshold = 0;
|
||||||
badCaptures = moves + MAX_MOVES;
|
badCaptures = moves + MAX_MOVES;
|
||||||
|
|
||||||
@@ -162,7 +162,8 @@ void MovePicker::go_next_phase() {
|
|||||||
case PH_NONCAPTURES_2:
|
case PH_NONCAPTURES_2:
|
||||||
curMove = lastMove;
|
curMove = lastMove;
|
||||||
lastMove = lastNonCapture;
|
lastMove = lastNonCapture;
|
||||||
insertion_sort<MoveStack>(curMove, lastMove);
|
if (depth >= 3 * ONE_PLY)
|
||||||
|
insertion_sort<MoveStack>(curMove, lastMove);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case PH_BAD_CAPTURES:
|
case PH_BAD_CAPTURES:
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ private:
|
|||||||
|
|
||||||
const Position& pos;
|
const Position& pos;
|
||||||
const History& H;
|
const History& H;
|
||||||
|
Depth depth;
|
||||||
Move ttMove;
|
Move ttMove;
|
||||||
MoveStack killers[2];
|
MoveStack killers[2];
|
||||||
int captureThreshold, phase;
|
int captureThreshold, phase;
|
||||||
|
|||||||
Reference in New Issue
Block a user