Day 16, in Mathematica and Rust (#14)

This commit is contained in:
Patrick Stevens
2021-12-16 11:06:04 +00:00
committed by GitHub
parent b257d486bd
commit b4ed32b7f7
8 changed files with 324 additions and 0 deletions

19
day_16/benches/bench.rs Normal file
View File

@@ -0,0 +1,19 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use day_16::day_16::{input, part_1, part_2};
fn criterion_benchmark(c: &mut Criterion) {
let input = input();
c.bench_function("day 16 part 1", |b| {
b.iter(|| {
black_box(part_1(&input));
})
});
c.bench_function("day 16 part 2", |b| {
b.iter(|| {
black_box(part_2(&input));
})
});
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);