official-stockfish/Stockfish — pull request #67 by homoSapiensSapiens (2014-10-06 13:55:04+00:00)
Title: Try to avoid calls to position legal

This avoids some calls to the somehow expensive Position::legal without adding operations to loop (bitwise and instead of comparison and logic or).
No functional change.