projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2ca06be
)
Performance improvement for small board sizes
author
ianfab
<ianfab@users.noreply.github.com>
Sun, 22 Jul 2018 11:22:55 +0000 (13:22 +0200)
committer
ianfab
<ianfab@users.noreply.github.com>
Sun, 22 Jul 2018 11:22:55 +0000 (13:22 +0200)
Filter out illegal moves early.
No functional change.
src/movegen.cpp
patch
|
blob
|
history
diff --git
a/src/movegen.cpp
b/src/movegen.cpp
index
2a84d87
..
ba1656c
100644
(file)
--- a/
src/movegen.cpp
+++ b/
src/movegen.cpp
@@
-338,6
+338,7
@@
ExtMove* generate(const Position& pos, ExtMove* moveList) {
Bitboard target = Type == CAPTURES ? pos.pieces(~us)
: Type == QUIETS ? ~pos.pieces()
: Type == NON_EVASIONS ? ~pos.pieces(us) : 0;
+ target &= pos.board_bb();
return us == WHITE ? generate_all<WHITE, Type>(pos, moveList, target)
: generate_all<BLACK, Type>(pos, moveList, target);