add clone benchmark

This commit is contained in:
Max Känner 2025-01-21 20:21:23 +01:00
parent 5bb7476af6
commit 47f75563ae

View File

@ -216,5 +216,17 @@ fn constrictor(c: &mut Criterion) {
}
}
criterion_group!(benches, standard, constrictor);
fn clone(c: &mut Criterion) {
let request = create_standard_start_request([
Coord { x: 1, y: 1 },
Coord { x: 9, y: 1 },
Coord { x: 1, y: 9 },
Coord { x: 9, y: 9 },
]);
let board = Board::from(&request);
c.bench_function("clone", |b| b.iter(|| board.clone()));
}
criterion_group!(benches, standard, constrictor, clone);
criterion_main!(benches);