use criterion::{Criterion, criterion_group, criterion_main};
use pathfinding::matrix::Matrix;
#[expect(clippy::missing_panics_doc)]
pub fn transpose_benchmark(c: &mut Criterion) {
let data: Vec<i32> = (0..100 * 100).collect();
let mut m = Matrix::square_from_vec(data).unwrap();
c.bench_function("transpose", |b| b.iter(|| m.transpose()));
}
#[expect(clippy::missing_panics_doc)]
pub fn transpose_non_square_benchmark(c: &mut Criterion) {
let data: Vec<i32> = (0..100 * 100).collect();
let mut m = Matrix::from_vec(1000, 10, data).unwrap();
c.bench_function("transpose_non_square", |b| b.iter(|| m.transpose()));
}
criterion_group!(benches, transpose_benchmark, transpose_non_square_benchmark);
criterion_main!(benches);