3 ms·
Let's say black pawn takes the white queen: Unset the bit representing this black pawn, set the bit where the black pawn is now, set the white queen long to zer
by qznc 9y ago
Let's say black pawn takes the white queen: Unset the bit representing this black pawn, set the bit where the black pawn is now, set the white queen long to zero. One load and two write operations to memory. The bit fiddling is probably neglible in terms of time on a modern CPU.
- moomin 9y agoSo here's the second question I'd ask: what happens if there was already a black pawn on the white queen's column?