Skip to content
Permalink
Browse files

QuietPick Speed-up

Non-functional speedup: no need to generate, score, or sort quiet moves
if SkipQuiet is true. Thanks to @mstembera for his suggestion.

STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 27910 W: 6406 L: 6129 D: 15375
http://tests.stockfishchess.org/tests/view/5d07e0920ebc5925cf0a58a8

Closes #2194

No functional change
  • Loading branch information...
VoyagerOne authored and snicolet committed Jun 17, 2019
1 parent 59f1d0c commit 297c40291a1cc0ca27fecef342501ba1c359f9cd
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/movepick.cpp
@@ -200,11 +200,15 @@ Move MovePicker::next_move(bool skipQuiets) {
/* fallthrough */

case QUIET_INIT:
cur = endBadCaptures;
endMoves = generate<QUIETS>(pos, cur);
if (!skipQuiets)
{
cur = endBadCaptures;
endMoves = generate<QUIETS>(pos, cur);

score<QUIETS>();
partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY);
score<QUIETS>();
partial_insertion_sort(cur, endMoves, -4000 * depth / ONE_PLY);
}

++stage;
/* fallthrough */

0 comments on commit 297c402

Please sign in to comment.
You can’t perform that action at this time.