Hackity hax
This commit is contained in:
10
benches/statepack.rs
Normal file
10
benches/statepack.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user