Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify BlockedByKing in pawn storms
This patch is non-functional. Current master does four operations to determine whether an enemy pawn on this file is blocked by the king or not ``` f == file_of(ksq) && rkThem == relative_rank(Us, ksq) + 1 ) ``` By adding a direction (based on the template color), this is reduced to two operations. This works because b is limited to enemy pawns that are ahead of the king and on the current file. ``` shift<Down>(b) & ksq ``` I've added a line of code, but the number of executing instructions is reduced (I think). I'm not sure if this counts as a simplification, but it should theoretically be a little faster (barely). The code line length is also reduced making it a little easier to read. Closes official-stockfish#1552 No functional change.
- Loading branch information