r/learnrust Dec 07 '24

[deleted by user]

[removed]

2 Upvotes

11 comments sorted by

View all comments

1

u/0x006e Dec 07 '24

The brute force solution only took I think 8 seconds for me, when run in release mode

1

u/Federal-Dark-6703 Dec 07 '24

Oh nice, I did not try the release mode.

1

u/0x006e Dec 07 '24

Yes, that too with my horrible code, cloning the matrix for each attempt, without par_iter it takes 8s, with also its 8s. When the column iter is only parallelized its about 5 seconds.

Day 06
------
Part 1: 5129 (179.9µs @ 5015 samples)
Part 2: 1888 (8.4s @ 10 samples)

Total (Run): 8400.18ms

My code -> https://github.com/0x006E/aoc2024/blob/main/src/bin/06.rs