Skip to content

Commit

Permalink
y2023/ex11 performance improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lmammino committed Dec 11, 2023
1 parent d1d86ce commit 34dccbc
Show file tree
Hide file tree
Showing 5 changed files with 382 additions and 0 deletions.
15 changes: 15 additions & 0 deletions y2023/ex11/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "y2023ex11"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[[bench]]
name = "bench_y2023ex11"
harness = false

[dev-dependencies]
criterion = "0.5.1"
15 changes: 15 additions & 0 deletions y2023/ex11/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Day 11: TODO: ADD TITLE HERE

[Check it out on adventofcode.com](https://adventofcode.com/2023/day/11)

## Part One

TODO: ADD DESCRIPTION HERE

Your puzzle answer was `?`. (TODO: )

## Part Two

TODO: ADD DESCRIPTION HERE

Your puzzle answer was `?`. (TODO: )
11 changes: 11 additions & 0 deletions y2023/ex11/benches/bench_y2023ex11.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use y2023ex11::{part1, part2};

fn criterion_benchmark(c: &mut Criterion) {
let input = include_str!("../input.txt");
c.bench_function("y2023ex11::part1", |b| b.iter(|| part1(black_box(input))));
c.bench_function("y2023ex11::part2", |b| b.iter(|| part2(black_box(input))));
}

criterion_group!(benches, criterion_benchmark);
criterion_main!(benches);
Loading

0 comments on commit 34dccbc

Please sign in to comment.