Commit Graph

823 Commits

Author SHA1 Message Date
c2389e93af Implement 2023 day 16 part 1 2023-12-16 11:38:50 +01:00
682e6f06b8 Flatten DP buffers
Going from 2d to 1d arrays improves cache locality and vectorization,
resulting in a roughly 40% speedup for part 2.
2023-12-15 17:39:59 +01:00
673e8184ed Zero init > 1 init 2023-12-15 09:03:06 +01:00
6657519179 Why have many hash map when few do trick 2023-12-15 08:54:02 +01:00
f898ffd216 Implement 2023 day 15 part 1 2023-12-15 08:45:19 +01:00
862ef3840c Implement 2023 day 15 part 1 2023-12-15 08:06:19 +01:00
44a1bcdc62 Merge owned and non-owned grids
Through the power of generics. Should've been easier if it was possible
to be generic over mutable and non-mutable, but AsRef/AsMut is close
enough
2023-12-14 21:33:09 +01:00
b7baebd050 Very clunky implementation of 2023 day 14 part 2 2023-12-14 20:05:25 +01:00
4f67ce4891 mplement 2023 day 14 part 1 2023-12-14 08:37:07 +01:00
975a1f8faf Misc fixes 2023-12-13 18:41:15 +01:00
0c4430ad01 Implement 2023 day 13 part 2 2023-12-13 18:33:09 +01:00
0838646973 Implement 2023 day 13 part 1 2023-12-13 18:21:19 +01:00
e449672487 Reduce dimensions of DP memo
We don't actually need all days, we just need the previous to build the
next
2023-12-12 18:14:32 +01:00
83d14af4f3 Missing sample 2023-12-12 12:20:13 +01:00
ec80523cac Implement 2023 day 12 2023-12-12 12:16:03 +01:00
06894b3455 Implement 2023 day 11 part 2 2023-12-11 08:54:33 +01:00
fb7e6d0a92 Implement 2023 day 11 part 1 2023-12-11 08:48:37 +01:00
43bf260887 Implement 2023 day 10 part 2 2023-12-10 11:45:18 +01:00
f1b23b0116 Implement 2023 day 10 part 1 2023-12-10 10:38:16 +01:00
126eeb7587 Move grid code to common 2023-12-10 09:59:19 +01:00
ee2ff35609 Remove most allocations from the code path 2023-12-09 19:42:20 +01:00
92c985cbd4 Unify part 1 and 2 better 2023-12-09 19:10:01 +01:00
de440ef10e Implement 2023 day 9 2023-12-09 10:52:23 +01:00
cfea20bed3 Implement 2023 day 8 part 2 2023-12-08 08:11:04 +01:00
8f6937ae42 Implement 2023 day 8 part 1 2023-12-08 07:14:36 +01:00
2d2be463d1 Avoid unnecessary floor 2023-12-07 21:52:37 +01:00
e1c23385c9 Replace binary search with maths 2023-12-07 21:45:20 +01:00
f5ca9af74b Clarify order of operations 2023-12-07 21:08:05 +01:00
de24e8b489 Replace sort with counting sort 2023-12-07 21:03:41 +01:00
64f10ff04d Fixed 2023 day 7 2023-12-07 20:48:22 +01:00
cb5af961bc Incorrect 2023 day 7 part 2
But it passes the tests, so I might as well push it.
2023-12-07 09:25:03 +01:00
164383efb7 Implement 2023 day 7 part 1 2023-12-07 09:04:45 +01:00
d2e1ad50d2 Off by one 2023-12-06 13:34:25 +01:00
bfed992b7d Binary search is best search 2023-12-06 08:53:55 +01:00
b3ccfb7a7d Implement 2023 day 6 part 2 2023-12-06 08:45:49 +01:00
4183f4a242 Implement 2023 day 6 part 1 2023-12-06 08:29:41 +01:00
018d41e753 Proper implementation for 2023 day 5 part 2 2023-12-05 19:15:41 +01:00
63c1024d22 Brute force day 2023 day 5 part 2 2023-12-05 09:10:16 +01:00
b7797c40aa Implement 2023 day 5 part 1 2023-12-05 09:01:00 +01:00
f92261c6b9 Unused import 2023-12-05 08:20:06 +01:00
1a45edd3ff Implement 2023 day 4 2023-12-04 08:11:27 +01:00
6e6713bfc3 Forgot to add sample, simplyfiy match 2023-12-03 19:48:17 +01:00
af3ee23050 Implement 2023 day 3 2023-12-03 19:45:48 +01:00
4ee6a82056 Now with fewer branches 2023-12-02 14:11:18 +01:00
5517662ae2 Replace regex with aho-corasick 2023-12-02 13:44:07 +01:00
2a419bb468 Unused imports 2023-12-02 10:46:36 +01:00
bf953b7980 Implement 2023 day 2 part 2 2023-12-02 10:40:33 +01:00
033625f041 Implement 2023 day 2 part 1 2023-12-02 10:32:53 +01:00
524527dbd1 Now with more iterators and 10% perf gain 2023-12-01 12:40:15 +01:00
1541b82c11 Implement 2023 day 1 part 2 2023-12-01 11:30:36 +01:00