mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Faster handling of king captures in Position::see
Another SEE speed up that passed the SPRT short TC test! LLR: 2.96 (-2.94,2.94) [-1.50,4.50] Total: 81337 W: 15060 L: 14745 D: 51532 No functional change.
This commit is contained in:
parent
41641e3b1e
commit
ddeb01612b
1 changed files with 9 additions and 4 deletions
|
@ -1080,13 +1080,18 @@ int Position::see(Move m) const {
|
||||||
|
|
||||||
// Locate and remove the next least valuable attacker
|
// Locate and remove the next least valuable attacker
|
||||||
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
captured = min_attacker<PAWN>(byTypeBB, to, stmAttackers, occupied, attackers);
|
||||||
stm = ~stm;
|
|
||||||
stmAttackers = attackers & pieces(stm);
|
|
||||||
|
|
||||||
// Stop before processing a king capture
|
// Stop before processing a king capture
|
||||||
if (captured == KING && stmAttackers)
|
if (captured == KING)
|
||||||
break;
|
{
|
||||||
|
if (stmAttackers == attackers)
|
||||||
|
++slIndex;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
stm = ~stm;
|
||||||
|
stmAttackers = attackers & pieces(stm);
|
||||||
++slIndex;
|
++slIndex;
|
||||||
|
|
||||||
} while (stmAttackers);
|
} while (stmAttackers);
|
||||||
|
|
Loading…
Add table
Reference in a new issue