Skip to content

Commit

Permalink
Chore: Re-organize inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
joshleaves committed Mar 15, 2024
1 parent 399d1c7 commit 821d3a5
Show file tree
Hide file tree
Showing 31 changed files with 55 additions and 55 deletions.
50 changes: 25 additions & 25 deletions benches/year_2015.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion};

pub fn year_2015_day_01(c: &mut Criterion) {
let mut g2015_day_01 = c.benchmark_group("year_2015::day_01");
let input_year_2015_day_01 = include_str!("../inputs/year_2015_day_01_input");
let input_year_2015_day_01 = include_str!("../inputs/year_2015/day_01_input");
g2015_day_01.bench_function("year_2015::day_01_v1", |b| {
b.iter(|| day_01::day_01_v1(black_box(input_year_2015_day_01)))
});
Expand All @@ -39,7 +39,7 @@ pub fn year_2015_day_01(c: &mut Criterion) {

pub fn year_2015_day_02(c: &mut Criterion) {
let mut g2015_day_02 = c.benchmark_group("year_2015::day_02");
let input_year_2015_day_02 = include_str!("../inputs/year_2015_day_02_input");
let input_year_2015_day_02 = include_str!("../inputs/year_2015/day_02_input");
g2015_day_02.bench_function("year_2015::day_02_v1", |b| {
b.iter(|| day_02::day_02_v1(black_box(input_year_2015_day_02)))
});
Expand All @@ -52,7 +52,7 @@ pub fn year_2015_day_02(c: &mut Criterion) {
pub fn year_2015_day_03(c: &mut Criterion) {
let mut g2015_day_03 = c.benchmark_group("year_2015::day_03");
g2015_day_03.sample_size(60);
let input_year_2015_day_03 = include_str!("../inputs/year_2015_day_03_input");
let input_year_2015_day_03 = include_str!("../inputs/year_2015/day_03_input");
g2015_day_03.bench_function("year_2015::day_03_v1", |b| {
b.iter(|| day_03::day_03_v1(black_box(input_year_2015_day_03)))
});
Expand All @@ -65,7 +65,7 @@ pub fn year_2015_day_03(c: &mut Criterion) {
pub fn year_2015_day_04(c: &mut Criterion) {
let mut g2015_day_04 = c.benchmark_group("year_2015::day_04");
g2015_day_04.sample_size(10);
let input_year_2015_day_04 = include_str!("../inputs/year_2015_day_04_input");
let input_year_2015_day_04 = include_str!("../inputs/year_2015/day_04_input");
g2015_day_04.bench_function("year_2015::day_04_v1", |b| {
b.iter(|| day_04::day_04_v1(black_box(input_year_2015_day_04)))
});
Expand All @@ -77,7 +77,7 @@ pub fn year_2015_day_04(c: &mut Criterion) {

pub fn year_2015_day_05(c: &mut Criterion) {
let mut g2015_day_05 = c.benchmark_group("year_2015::day_05");
let input_year_2015_day_05 = include_str!("../inputs/year_2015_day_05_input");
let input_year_2015_day_05 = include_str!("../inputs/year_2015/day_05_input");
g2015_day_05.bench_function("year_2015::day_05_v1", |b| {
b.iter(|| day_05::day_05_v1(black_box(input_year_2015_day_05)))
});
Expand All @@ -89,7 +89,7 @@ pub fn year_2015_day_05(c: &mut Criterion) {

pub fn year_2015_day_06(c: &mut Criterion) {
let mut g2015_day_06 = c.benchmark_group("year_2015::day_06");
let input_year_2015_day_06 = include_str!("../inputs/year_2015_day_06_input");
let input_year_2015_day_06 = include_str!("../inputs/year_2015/day_06_input");
g2015_day_06.bench_function("year_2015::day_06_v1", |b| {
b.iter(|| day_06::day_06_v1(black_box(input_year_2015_day_06)))
});
Expand All @@ -101,7 +101,7 @@ pub fn year_2015_day_06(c: &mut Criterion) {

pub fn year_2015_day_07(c: &mut Criterion) {
let mut g2015_day_07 = c.benchmark_group("year_2015::day_07");
let input_year_2015_day_07 = include_str!("../inputs/year_2015_day_07_input");
let input_year_2015_day_07 = include_str!("../inputs/year_2015/day_07_input");
g2015_day_07.bench_function("year_2015::day_07_v1", |b| {
b.iter(|| day_07::day_07_v1(black_box(input_year_2015_day_07)))
});
Expand All @@ -113,7 +113,7 @@ pub fn year_2015_day_07(c: &mut Criterion) {

pub fn year_2015_day_08(c: &mut Criterion) {
let mut g2015_day_08 = c.benchmark_group("year_2015::day_08");
let input_year_2015_day_08 = include_str!("../inputs/year_2015_day_08_input");
let input_year_2015_day_08 = include_str!("../inputs/year_2015/day_08_input");
g2015_day_08.bench_function("year_2015::day_08_v1", |b| {
b.iter(|| day_08::day_08_v1(black_box(input_year_2015_day_08)))
});
Expand All @@ -125,7 +125,7 @@ pub fn year_2015_day_08(c: &mut Criterion) {

pub fn year_2015_day_09(c: &mut Criterion) {
let mut g2015_day_09 = c.benchmark_group("year_2015::day_09");
let input_year_2015_day_09 = include_str!("../inputs/year_2015_day_09_input");
let input_year_2015_day_09 = include_str!("../inputs/year_2015/day_09_input");
g2015_day_09.bench_function("year_2015::day_09_v1", |b| {
b.iter(|| day_09::day_09_v1(black_box(input_year_2015_day_09)))
});
Expand All @@ -137,7 +137,7 @@ pub fn year_2015_day_09(c: &mut Criterion) {

pub fn year_2015_day_10(c: &mut Criterion) {
let mut g2015_day_10 = c.benchmark_group("year_2015::day_10");
let input_year_2015_day_10 = include_str!("../inputs/year_2015_day_10_input");
let input_year_2015_day_10 = include_str!("../inputs/year_2015/day_10_input");
g2015_day_10.bench_function("year_2015::day_10_v1", |b| {
b.iter(|| day_10::day_10_v1(black_box(input_year_2015_day_10)))
});
Expand All @@ -149,7 +149,7 @@ pub fn year_2015_day_10(c: &mut Criterion) {

pub fn year_2015_day_11(c: &mut Criterion) {
let mut g2015_day_11 = c.benchmark_group("year_2015::day_11");
let input_year_2015_day_11 = include_str!("../inputs/year_2015_day_11_input");
let input_year_2015_day_11 = include_str!("../inputs/year_2015/day_11_input");
g2015_day_11.bench_function("year_2015::day_11_v1", |b| {
b.iter(|| day_11::day_11_v1(black_box(input_year_2015_day_11)))
});
Expand All @@ -161,7 +161,7 @@ pub fn year_2015_day_11(c: &mut Criterion) {

pub fn year_2015_day_12(c: &mut Criterion) {
let mut g2015_day_12 = c.benchmark_group("year_2015::day_12");
let input_year_2015_day_12 = include_str!("../inputs/year_2015_day_12_input");
let input_year_2015_day_12 = include_str!("../inputs/year_2015/day_12_input");
g2015_day_12.bench_function("year_2015::day_12_v1", |b| {
b.iter(|| day_12::day_12_v1(black_box(input_year_2015_day_12)))
});
Expand All @@ -173,7 +173,7 @@ pub fn year_2015_day_12(c: &mut Criterion) {

pub fn year_2015_day_13(c: &mut Criterion) {
let mut g2015_day_13 = c.benchmark_group("year_2015::day_13");
let input_year_2015_day_13 = include_str!("../inputs/year_2015_day_13_input");
let input_year_2015_day_13 = include_str!("../inputs/year_2015/day_13_input");
g2015_day_13.bench_function("year_2015::day_13_v1", |b| {
b.iter(|| day_13::day_13_v1(black_box(input_year_2015_day_13)))
});
Expand All @@ -185,7 +185,7 @@ pub fn year_2015_day_13(c: &mut Criterion) {

pub fn year_2015_day_14(c: &mut Criterion) {
let mut g2015_day_14 = c.benchmark_group("year_2015::day_14");
let input_year_2015_day_14 = include_str!("../inputs/year_2015_day_14_input");
let input_year_2015_day_14 = include_str!("../inputs/year_2015/day_14_input");
g2015_day_14.bench_function("year_2015::day_14_v1", |b| {
b.iter(|| day_14::day_14_v1(black_box(input_year_2015_day_14)))
});
Expand All @@ -197,7 +197,7 @@ pub fn year_2015_day_14(c: &mut Criterion) {

pub fn year_2015_day_15(c: &mut Criterion) {
let mut g2015_day_15 = c.benchmark_group("year_2015::day_15");
let input_year_2015_day_15 = include_str!("../inputs/year_2015_day_15_input");
let input_year_2015_day_15 = include_str!("../inputs/year_2015/day_15_input");
g2015_day_15.bench_function("year_2015::day_15_v1", |b| {
b.iter(|| day_15::day_15_v1(black_box(input_year_2015_day_15)))
});
Expand All @@ -209,7 +209,7 @@ pub fn year_2015_day_15(c: &mut Criterion) {

pub fn year_2015_day_16(c: &mut Criterion) {
let mut g2015_day_16 = c.benchmark_group("year_2015::day_16");
let input_year_2015_day_16 = include_str!("../inputs/year_2015_day_16_input");
let input_year_2015_day_16 = include_str!("../inputs/year_2015/day_16_input");
g2015_day_16.bench_function("year_2015::day_16_v1", |b| {
b.iter(|| day_16::day_16_v1(black_box(input_year_2015_day_16)))
});
Expand All @@ -221,7 +221,7 @@ pub fn year_2015_day_16(c: &mut Criterion) {

pub fn year_2015_day_17(c: &mut Criterion) {
let mut g2015_day_17 = c.benchmark_group("year_2015::day_17");
let input_year_2015_day_17 = include_str!("../inputs/year_2015_day_17_input");
let input_year_2015_day_17 = include_str!("../inputs/year_2015/day_17_input");
g2015_day_17.bench_function("year_2015::day_17_v1", |b| {
b.iter(|| day_17::day_17_v1(black_box(input_year_2015_day_17)))
});
Expand All @@ -233,7 +233,7 @@ pub fn year_2015_day_17(c: &mut Criterion) {

pub fn year_2015_day_18(c: &mut Criterion) {
let mut g2015_day_18 = c.benchmark_group("year_2015::day_18");
let input_year_2015_day_18 = include_str!("../inputs/year_2015_day_18_input");
let input_year_2015_day_18 = include_str!("../inputs/year_2015/day_18_input");
g2015_day_18.bench_function("year_2015::day_18_v1", |b| {
b.iter(|| day_18::day_18_v1(black_box(input_year_2015_day_18)))
});
Expand All @@ -245,7 +245,7 @@ pub fn year_2015_day_18(c: &mut Criterion) {

pub fn year_2015_day_19(c: &mut Criterion) {
let mut g2015_day_19 = c.benchmark_group("year_2015::day_19");
let input_year_2015_day_19 = include_str!("../inputs/year_2015_day_19_input");
let input_year_2015_day_19 = include_str!("../inputs/year_2015/day_19_input");
g2015_day_19.bench_function("year_2015::day_19_v1", |b| {
b.iter(|| day_19::day_19_v1(black_box(input_year_2015_day_19)))
});
Expand All @@ -257,7 +257,7 @@ pub fn year_2015_day_19(c: &mut Criterion) {

pub fn year_2015_day_20(c: &mut Criterion) {
let mut g2015_day_20 = c.benchmark_group("year_2015::day_20");
let input_year_2015_day_20 = include_str!("../inputs/year_2015_day_20_input");
let input_year_2015_day_20 = include_str!("../inputs/year_2015/day_20_input");
g2015_day_20.bench_function("year_2015::day_20_v1", |b| {
b.iter(|| day_20::day_20_v1(black_box(input_year_2015_day_20)))
});
Expand All @@ -269,7 +269,7 @@ pub fn year_2015_day_20(c: &mut Criterion) {

pub fn year_2015_day_21(c: &mut Criterion) {
let mut g2015_day_21 = c.benchmark_group("year_2015::day_21");
let input_year_2015_day_21 = include_str!("../inputs/year_2015_day_21_input");
let input_year_2015_day_21 = include_str!("../inputs/year_2015/day_21_input");
g2015_day_21.bench_function("year_2015::day_21_v1", |b| {
b.iter(|| day_21::day_21_v1(black_box(input_year_2015_day_21)))
});
Expand All @@ -281,7 +281,7 @@ pub fn year_2015_day_21(c: &mut Criterion) {

pub fn year_2015_day_22(c: &mut Criterion) {
let mut g2015_day_22 = c.benchmark_group("year_2015::day_22");
let input_year_2015_day_22 = include_str!("../inputs/year_2015_day_22_input");
let input_year_2015_day_22 = include_str!("../inputs/year_2015/day_22_input");
g2015_day_22.bench_function("year_2015::day_22_v1", |b| {
b.iter(|| day_22::day_22_v1(black_box(input_year_2015_day_22)))
});
Expand All @@ -293,7 +293,7 @@ pub fn year_2015_day_22(c: &mut Criterion) {

pub fn year_2015_day_23(c: &mut Criterion) {
let mut g2015_day_23 = c.benchmark_group("year_2015::day_23");
let input_year_2015_day_23 = include_str!("../inputs/year_2015_day_23_input");
let input_year_2015_day_23 = include_str!("../inputs/year_2015/day_23_input");
g2015_day_23.bench_function("year_2015::day_23_v1", |b| {
b.iter(|| day_23::day_23_v1(black_box(input_year_2015_day_23)))
});
Expand All @@ -305,7 +305,7 @@ pub fn year_2015_day_23(c: &mut Criterion) {

pub fn year_2015_day_24(c: &mut Criterion) {
let mut g2015_day_24 = c.benchmark_group("year_2015::day_24");
let input_year_2015_day_24 = include_str!("../inputs/year_2015_day_24_input");
let input_year_2015_day_24 = include_str!("../inputs/year_2015/day_24_input");
g2015_day_24.bench_function("year_2015::day_24_v1", |b| {
b.iter(|| day_24::day_24_v1(black_box(input_year_2015_day_24)))
});
Expand All @@ -317,7 +317,7 @@ pub fn year_2015_day_24(c: &mut Criterion) {

pub fn year_2015_day_25(c: &mut Criterion) {
let mut g2015_day_25 = c.benchmark_group("year_2015::day_25");
let input_year_2015_day_25 = include_str!("../inputs/year_2015_day_25_input");
let input_year_2015_day_25 = include_str!("../inputs/year_2015/day_25_input");
g2015_day_25.bench_function("year_2015::day_25", |b| {
b.iter(|| day_25::day_25(black_box(input_year_2015_day_25)))
});
Expand Down
4 changes: 2 additions & 2 deletions benches/year_2015_day_01.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pub fn day_01_v2_fast(input: impl Into<String>) -> i16 {
pub fn bench_year_2015_day_01_v1(c: &mut Criterion) {
let mut group = c.benchmark_group("year_2015::day_01_v1");
group.warm_up_time(Duration::from_millis(100));
let input = include_str!("../inputs/year_2015_day_01_input");
let input = include_str!("../inputs/year_2015/day_01_input");
group.bench_with_input(BenchmarkId::new("Naive", input.len()), input, |b, input| {
b.iter(|| day_01_v1_naive(input))
});
Expand All @@ -96,7 +96,7 @@ pub fn bench_year_2015_day_01_v1(c: &mut Criterion) {
pub fn bench_year_2015_day_01_v2(c: &mut Criterion) {
let mut group = c.benchmark_group("year_2015::day_01_v2");
group.warm_up_time(Duration::from_millis(100));
let input = include_str!("../inputs/year_2015_day_01_input");
let input = include_str!("../inputs/year_2015/day_01_input");
group.bench_with_input(
BenchmarkId::new("Normal", input.len()),
input,
Expand Down
2 changes: 1 addition & 1 deletion benches/year_2015_day_03.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn day_03_v2_bset(input: &str) -> usize {
}

pub fn bench_year_2015_day_03_sets(c: &mut Criterion) {
let input = include_str!("../inputs/year_2015_day_03_input");
let input = include_str!("../inputs/year_2015/day_03_input");
let mut group_v1 = c.benchmark_group("year_2015::day_03_v1");
group_v1.warm_up_time(Duration::from_millis(100));
group_v1.bench_with_input(
Expand Down
2 changes: 1 addition & 1 deletion benches/year_2015_day_05.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn day_05_v1_contains(input: &str) -> u32 {
}

pub fn bench_year_2015_day_05_v1(c: &mut Criterion) {
let input = include_str!("../inputs/year_2015_day_05_input");
let input = include_str!("../inputs/year_2015/day_05_input");
let mut group = c.benchmark_group("year_2015::day_05_v1");
group.warm_up_time(Duration::from_millis(100));
group.bench_with_input(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 821d3a5

Please sign in to comment.