mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Another generate_piece_moves() micro optimization
This time on the for loop. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -576,7 +576,7 @@ namespace {
|
||||
Square from, to;
|
||||
Bitboard b;
|
||||
|
||||
for (int i = 0; i < pos.piece_count(us, Piece); i++)
|
||||
for (int i = 0, e = pos.piece_count(us, Piece); i < e; i++)
|
||||
{
|
||||
from = pos.piece_list(us, Piece, i);
|
||||
b = pos.piece_attacks<Piece>(from) & target;
|
||||
|
||||
Reference in New Issue
Block a user