summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
811037c)
Speedup of the whole 3 patch series is of 2,5% !!
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
/// move ordering is at the current node.
MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h,
/// move ordering is at the current node.
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;
badCaptures = moves + MAX_MOVES;
captureThreshold = 0;
badCaptures = moves + MAX_MOVES;
case PH_NONCAPTURES_2:
curMove = lastMove;
lastMove = lastNonCapture;
case PH_NONCAPTURES_2:
curMove = lastMove;
lastMove = lastNonCapture;
- insertion_sort<MoveStack>(curMove, lastMove);
+ if (depth >= 3 * ONE_PLY)
+ insertion_sort<MoveStack>(curMove, lastMove);
return;
case PH_BAD_CAPTURES:
return;
case PH_BAD_CAPTURES:
const Position& pos;
const History& H;
const Position& pos;
const History& H;
Move ttMove;
MoveStack killers[2];
int captureThreshold, phase;
Move ttMove;
MoveStack killers[2];
int captureThreshold, phase;