mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 08:37:44 +00:00
Microptimize MoveList loop
Add MOVE_NONE at the tail, this allows to loop across MoveList checking for *it != MOVE_NONE, and because *it is used imediately after compiler is able to reuse it. With this small patch perft speed increased of 3% And it is also a semplification ! No functional change.
This commit is contained in:
+1
-1
@@ -408,7 +408,7 @@ const string Position::pretty(Move move) const {
|
||||
ss << square_to_string(pop_lsb(&b)) << " ";
|
||||
|
||||
ss << "\nLegal moves: ";
|
||||
for (MoveList<LEGAL> it(*this); !it.end(); ++it)
|
||||
for (MoveList<LEGAL> it(*this); *it; ++it)
|
||||
ss << move_to_san(*const_cast<Position*>(this), *it) << " ";
|
||||
|
||||
return ss.str();
|
||||
|
||||
Reference in New Issue
Block a user