diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-24 20:55:21 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-24 20:55:21 +0300 |
commit | 4a62a723f052ed0506cf9342c009cc315a8379a3 (patch) | |
tree | 2ba5bb20d17776268259fc9d446a52ba0f9dd1d0 /benches/perft.rs | |
parent | 36c8c6bd84513fe2a8c9956b842baaee510b25c0 (diff) | |
download | chessnost-4a62a723f052ed0506cf9342c009cc315a8379a3.tar.gz |
bench: setup perft benchmarking
Diffstat (limited to 'benches/perft.rs')
-rw-r--r-- | benches/perft.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/benches/perft.rs b/benches/perft.rs new file mode 100644 index 0000000..c73208f --- /dev/null +++ b/benches/perft.rs @@ -0,0 +1,11 @@ +use std::time::Instant; +use chessnost::board::Board; + +fn main() { + let fen = String::from("r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - "); + let mut board = Board::from_FEN(fen); + + let start = Instant::now(); + let result = board.perft(5, false); + println!("Perft finished in {:?}: {:?}", start.elapsed(), result); +} |