Integrate next_stage() logic into next_move()

Measured bench speed up goes from 0,7% to 2%,
given the unreliable measure a reverse simmplification
test was done on fishtest:

master vs patch
LLR: -2.94 (-2.94,2.94) [-3.00,1.00]
Total: 15499 W: 2685 L: 2867 D: 9947

Test result is positive, master is weaker.

No functional change.
This commit is contained in:
syzygy
2016-09-10 21:37:36 +02:00
committed by Marco Costalba
parent ace8e951d7
commit 438805aee8
2 changed files with 146 additions and 126 deletions

View File

@@ -108,8 +108,7 @@ public:
private:
template<GenType> void score();
void generate_next_stage();
ExtMove* begin() { return moves; }
ExtMove* begin() { return cur; }
ExtMove* end() { return endMoves; }
const Position& pos;
@@ -117,12 +116,11 @@ private:
Move countermove;
Depth depth;
Move ttMove;
ExtMove killers[3];
Square recaptureSquare;
Value threshold;
int stage;
ExtMove* endBadCaptures = moves + MAX_MOVES - 1;
ExtMove moves[MAX_MOVES], *cur = moves, *endMoves = moves;
ExtMove* cur, *endMoves, *endBadCaptures;
ExtMove moves[MAX_MOVES];
};
#endif // #ifndef MOVEPICK_H_INCLUDED