Added benchmarking

This commit is contained in:
Connor Johnstone
2023-12-01 15:39:12 -07:00
parent 48bd1e61cb
commit 86c583b3b0
5 changed files with 616 additions and 0 deletions

11
day_01/benches/part2.rs Normal file
View File

@@ -0,0 +1,11 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use day_01::prelude::*;
fn criterion_benchmark(c: &mut Criterion) {
let input = include_str!("../input.txt");
c.bench_function("part 2", |b| b.iter(|| part2(black_box(input))));
}
criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);