mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Small speed-up in BetweenBB
A speed-up removing some comparisons. closes https://github.com/official-stockfish/Stockfish/pull/2571 No functional change.
This commit is contained in:
parent
5a7b45eac9
commit
0424273d0b
1 changed files with 2 additions and 2 deletions
|
@ -199,8 +199,8 @@ inline Bitboard adjacent_files_bb(Square s) {
|
|||
/// If the given squares are not on a same file/rank/diagonal, return 0.
|
||||
|
||||
inline Bitboard between_bb(Square s1, Square s2) {
|
||||
return LineBB[s1][s2] & ( (AllSquares << (s1 + (s1 < s2)))
|
||||
^(AllSquares << (s2 + !(s1 < s2))));
|
||||
Bitboard b = LineBB[s1][s2] & ((AllSquares << s1) ^ (AllSquares << s2));
|
||||
return b & (b - 1); //exclude lsb
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue