Commit Graph

45 Commits

Author SHA1 Message Date
a56fc933c9 day12: complete solution 2024-12-11 22:27:59 -08:00
31eb500832 day7: slight performance improvement from skipping ThreadLoacls 2024-12-11 19:40:45 -08:00
4c14c6092e bugfix: count off by one, thought ^ was left in the map, but it gets
replaced by X
2024-12-11 18:59:58 -08:00
de535303d4 day11: don't use aoc_generator 2024-12-11 18:43:57 -08:00
50b6d045e7 multiple: genericize Grid over coordinate type, parallelism for day 11 2024-12-11 18:43:13 -08:00
d2defae8a2 chore: make day modules public 2024-12-11 18:40:53 -08:00
cd8900d936 chore: enable LTO for release builds 2024-12-11 18:40:29 -08:00
11b29a4d57 chore: refactor for cargo-aoc / codspeed 2024-12-11 15:45:52 -08:00
3bfde9fd9b day11: some cleanup, slight performance 2024-12-11 03:11:17 -08:00
2e239681ce day11: performance 2024-12-11 00:55:47 -08:00
a7354b6ed7 day11: part 2 solution 2024-12-10 23:40:03 -08:00
462918b382 day11: part 1 solution 2024-12-10 21:55:00 -08:00
8af11a6092 day10: performance. slight gain from memoizing visited positions in p1. 2024-12-10 17:07:00 -08:00
d9d55b069f day10: optimization
Part 2 doesn't actually require tracking state at all, it's enough to
just follow the rules and count every DFS that lands on a target square.

Part 1 optimized by only tracking which targets have been previously
visited, instead of all squares.

Both parts, pass position reference to recursive calls instead of by
value for tiny improvement.
2024-12-10 16:20:15 -08:00
0716dde8b1 day10: complete solution 2024-12-09 21:59:39 -08:00
206c1fca85 day9: optimize part 2 2024-12-09 00:23:40 -08:00
f7cf4f1e9f day9: optimize part 1 2024-12-08 23:58:47 -08:00
b08c8fbd80 day9: use part 2 'inodes' table to speed up part 1 2024-12-08 23:51:51 -08:00
2bc751dd0d day9: complete solution
previous commit should actually work for part 1 if you don't truncate
the input.
2024-12-08 23:34:15 -08:00
a6ea5b4155 day9: second rewrite, still failing 2024-12-08 22:57:20 -08:00
622877843e day8: refactor and cleanup 2024-12-07 22:49:57 -08:00
47e40942e2 day8: complete solution 2024-12-07 21:43:56 -08:00
3e0bc0d5cc day7: parallel solution, < 100ms
This is definitely a problem that calls for DFS, but I couldn't be
bothered.
2024-12-06 22:52:00 -08:00
868c3e56fc day7: complete solution 2024-12-06 21:40:25 -08:00
fee37aebd0 day6: further performance improvement, ~55ms total runtime
We only need to run the guard forward from the step before the obstacle
we placed, instead of starting at the original starting position.

The code starts to look ugly...
2024-12-06 17:05:36 -08:00
b1918bbebf day6: performance - only check obstacles on the original path
700ms -> 150ms
2024-12-06 10:59:43 -08:00
1cd535c2aa chore: clippies 2024-12-06 10:52:31 -08:00
1dd3ce5862 day6: performance improvement 2024-12-06 10:40:28 -08:00
145d779e83 day6: complete solution + grid lib (used in solution) 2024-12-05 22:41:47 -08:00
49c37800a0 day5: complete solution 2024-12-04 22:41:33 -08:00
e2cd0fe9cc day3: code format 2024-12-04 16:41:39 -08:00
6a619d756f gitignore 2024-12-04 16:41:16 -08:00
dc67b38420 day3: disable unicode matching, don't recompile RE for every iteration 2024-12-04 16:41:00 -08:00
e5faee3470 day4: do a lot fewer allocations, performance improvement x10 2024-12-03 22:09:13 -08:00
a81904f2eb day4: complete solution 2024-12-03 22:02:49 -08:00
ec55b07c61 boilerplate: fix it 2024-12-02 21:22:05 -08:00
7a7fb4d02a day3: full solution 2024-12-02 21:18:37 -08:00
b24593a469 day2: performance and adopt new duration print 2024-12-01 23:02:00 -08:00
ec2651c3e4 boilerplate: improve duration printing 2024-12-01 21:32:17 -08:00
33c0c876c3 day2: full solution 2024-12-01 21:31:29 -08:00
968d795720 day 1: cleanup and refactor
* I misunderstood the problem and thought we were asked for the distance
  between the numbers' positions, not their values. Removed remnants of
  that.
* Move to struct-oriented solution
* Fix clippys and unnecessary code
2024-11-30 22:03:19 -08:00
8cab780ff3 day 1: problem 2 solution 2024-11-30 21:46:10 -08:00
892d59f21b day 1: problem 1 solution 2024-11-30 21:38:31 -08:00
76cacf4704 gitignore 2024-11-30 21:37:02 -08:00
fd24918c7a 2024 AoC is here! 2024-11-30 21:36:05 -08:00