Parallel part1

This commit is contained in:
Adrian Groh 2024-12-06 12:09:30 +01:00
parent e364d411c8
commit 1ae8f8caf9
Signed by: Gobidev
GPG Key ID: 3AA3153E98B0D771

View File

@ -145,7 +145,7 @@ fn part1(state: &mut State) -> usize {
while move_guard(state) == Running {} while move_guard(state) == Running {}
state state
.map .map
.iter() .par_iter()
.map(|l| l.iter().filter(|c| matches!(c, Visited(_))).count()) .map(|l| l.iter().filter(|c| matches!(c, Visited(_))).count())
.sum() .sum()
} }