mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 03:57:45 +00:00
Micro-optimization for SEE: remove a superfluous condition
This condition can never be true, it's superfluous. It never triggers even with a bench 16 1 20 run. To met the condition it would imply that the previous recapture was done by a higher rated piece than a Queen. This is only the case when the King recaptures and that's already handled in line 1161: (return (attackers & ~pieces(stm)) ? res ^ 1). closes https://github.com/official-stockfish/Stockfish/pull/5839 No functional change
This commit is contained in:
committed by
Disservin
parent
d46c0b6f49
commit
2a1ab11ab0
+3
-2
@@ -1137,8 +1137,9 @@ bool Position::see_ge(Move m, int threshold) const {
|
|||||||
|
|
||||||
else if ((bb = stmAttackers & pieces(QUEEN)))
|
else if ((bb = stmAttackers & pieces(QUEEN)))
|
||||||
{
|
{
|
||||||
if ((swap = QueenValue - swap) < res)
|
swap = QueenValue - swap;
|
||||||
break;
|
// implies that the previous recapture was done by a higher rated piece than a Queen (King is excluded)
|
||||||
|
assert(swap >= res);
|
||||||
occupied ^= least_significant_square_bb(bb);
|
occupied ^= least_significant_square_bb(bb);
|
||||||
|
|
||||||
attackers |= (attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN))
|
attackers |= (attacks_bb<BISHOP>(to, occupied) & pieces(BISHOP, QUEEN))
|
||||||
|
|||||||
Reference in New Issue
Block a user