Hacker News new | ask | show | jobs
by qznc 3097 days 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.
1 comments

So here's the second question I'd ask: what happens if there was already a black pawn on the white queen's column?
A 64bit data type means one bit per field. It is not 8bit per pawn. It does not distinguish between pawns.
Why would that matter? The bitboard representation allows for multiple pawns per column.