bench: add board place benchmark

This commit is contained in:
2025-02-28 20:53:36 -05:00
parent 47050a6871
commit 97d914238c
5 changed files with 37 additions and 3 deletions

View File

@@ -162,8 +162,9 @@ impl Board {
}
/// Place a piece without checking for propegation of validity
/// only pub for setting up benchmark
#[const_fn(cfg(not(feature = "bitvec")))]
const fn place_unchecked(&mut self, coord: CoordPair, piece: Piece) {
pub const fn place_unchecked(&mut self, coord: CoordPair, piece: Piece) {
self.board_mut(piece).set(coord, true);
self.board_mut(piece.flip()).set(coord, false);
}