Trying to optimize heap allocations

This commit is contained in:
Dylan Thies
2024-01-06 11:30:48 -05:00
parent 8c52af6819
commit 039f87d762
9 changed files with 127 additions and 169 deletions

View File

@@ -1,9 +1,16 @@
#![warn(clippy::all, clippy::pedantic)]
#[cfg(feature = "dhat-heap")]
#[global_allocator]
static ALLOC: dhat::Alloc = dhat::Alloc;
use day_20::part1;
use day_20::part2;
fn main() {
#[cfg(feature = "dhat-heap")]
let _profiler = dhat::Profiler::new_heap();
let input = include_str!("./input.txt");
let part1_result = part1(input);
println!("part 1: {part1_result}");