mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 13:17:44 +00:00
Compute checkers from scratch
This micro-optimization only complicates the code and provides no benefit. Removing it is even a speedup on my machine (i7-3770k, linux, gcc 4.9.1): stat test master diff mean 2,403,118 2,390,904 12,214 stdev 12,043 10,620 3,677 speedup 0.51% P(speedup>0) 100.0% No functional change.
This commit is contained in:
+4
-4
@@ -173,7 +173,7 @@ uint64_t Search::perft(Position& pos, Depth depth) {
|
||||
cnt = 1, nodes++;
|
||||
else
|
||||
{
|
||||
pos.do_move(*it, st, ci, pos.gives_check(*it, ci));
|
||||
pos.do_move(*it, st, pos.gives_check(*it, ci));
|
||||
cnt = leaf ? MoveList<LEGAL>(pos).size() : perft<false>(pos, depth - ONE_PLY);
|
||||
nodes += cnt;
|
||||
pos.undo_move(*it);
|
||||
@@ -702,7 +702,7 @@ namespace {
|
||||
if (pos.legal(move, ci.pinned))
|
||||
{
|
||||
ss->currentMove = move;
|
||||
pos.do_move(move, st, ci, pos.gives_check(move, ci));
|
||||
pos.do_move(move, st, pos.gives_check(move, ci));
|
||||
value = -search<NonPV, false>(pos, ss+1, -rbeta, -rbeta+1, rdepth, !cutNode);
|
||||
pos.undo_move(move);
|
||||
if (value >= rbeta)
|
||||
@@ -894,7 +894,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
quietsSearched[quietCount++] = move;
|
||||
|
||||
// Step 14. Make the move
|
||||
pos.do_move(move, st, ci, givesCheck);
|
||||
pos.do_move(move, st, givesCheck);
|
||||
|
||||
// Step 15. Reduced depth search (LMR). If the move fails high it will be
|
||||
// re-searched at full depth.
|
||||
@@ -1255,7 +1255,7 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
ss->currentMove = move;
|
||||
|
||||
// Make and search the move
|
||||
pos.do_move(move, st, ci, givesCheck);
|
||||
pos.do_move(move, st, givesCheck);
|
||||
value = givesCheck ? -qsearch<NT, true>(pos, ss+1, -beta, -alpha, depth - ONE_PLY)
|
||||
: -qsearch<NT, false>(pos, ss+1, -beta, -alpha, depth - ONE_PLY);
|
||||
pos.undo_move(move);
|
||||
|
||||
Reference in New Issue
Block a user