Diffstat (limited to 'benches/bench.rs')
| -rw-r--r-- | benches/bench.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/benches/bench.rs b/benches/bench.rs index 3102ff1..49b2fe7 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -2,12 +2,14 @@ use criterion::{criterion_group, criterion_main, Criterion}; -use codspeed_aoc::day15; +use codspeed_aoc::day21; pub fn bench_day_14(c: &mut Criterion) { let mut group = c.benchmark_group(concat!("day", 14)); - let input = include_str!("../inp.txt"); - group.bench_function(format!("part1"), |b| b.iter(|| day15::part1(input))); - group.bench_function(format!("part2"), |b| b.iter(|| day15::part2(input))); + let input = std::hint::black_box(include_str!("../inp.txt")); + println!("{}", day21::part1(input)); + println!("{}", day21::part2(input)); + group.bench_function(format!("part1"), |b| b.iter(|| day21::part1(input))); + group.bench_function(format!("part2"), |b| b.iter(|| day21::part2(input))); } criterion_group!(benches, bench_day_14); |