Files
pyramix/benches/statepack.rs
2023-11-26 21:29:23 +01:00

10 lines
371 B
Rust

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use rubik::state::State;
pub fn bench_pack(c: &mut Criterion) {
c.bench_function("unpack", |b| b.iter(|| State::unpack(black_box(12345))));
c.bench_function("pack", |b| b.iter(|| State::pack(black_box(State::default()))));
}
criterion_group!(benches, bench_pack);
criterion_main!(benches);