projects
/
stockfish
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e768e4
)
Another generate_piece_moves() micro optimization
author
Marco Costalba
<mcostalba@gmail.com>
Thu, 23 Oct 2008 07:47:00 +0000
(09:47 +0200)
committer
Marco Costalba
<mcostalba@gmail.com>
Fri, 24 Oct 2008 19:10:04 +0000
(21:10 +0200)
This time on the for loop.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/movegen.cpp
patch
|
blob
|
history
diff --git
a/src/movegen.cpp
b/src/movegen.cpp
index 95a73737790eda1a685f438a522e248416235d59..54af3222e5b21b7657edf691a791d1fbc8d5cbf1 100644
(file)
--- a/
src/movegen.cpp
+++ b/
src/movegen.cpp
@@
-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;