day3: switch to cached from memoize (faster and more mature)

This commit is contained in:
2025-12-03 01:02:28 -08:00
parent fec1fc51dd
commit aebea5c94d

View File

@@ -1,5 +1,5 @@
use aoc_runner_derive::{aoc, aoc_generator};
use memoize::memoize;
use cached::proc_macro::cached;
use misc::POW10;
#[aoc_generator(day3)]
@@ -10,7 +10,7 @@ fn parse(input: &str) -> Vec<Vec<u8>> {
.collect()
}
#[memoize]
#[cached]
fn max_joltage(bank: Vec<u8>, n: usize) -> u64 {
if n == 1 {
return *bank.iter().max().unwrap() as u64;