Parallel part1
This commit is contained in:
parent
e364d411c8
commit
1ae8f8caf9
@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user