My solutions for AdventOfCode 2025. Primary language: Go
|
|
||
|---|---|---|
| cmd | ||
| shared | ||
| tasks | ||
| templates/day | ||
| .gitignore | ||
| go.mod | ||
| languages.toml | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
aoc2025
Sketchy solutions to Advent of Code 2025.
To run a day:
- Change the
dayimport inmain.goto the appropriate value - Configure which input you'd like to use
- Configure which one of the day's task you'd like to execute
Remarks
Day 6
Initially, I took a bad decision when modeling the data structure for task 1, which lead me with two choices for task 2:
- Rewrite everything to match the new task, or
- Monkey-Path some special behavior that would make it work.
I went with the latter, and it works and isn't too bad, but still I'm not really happy with it.
Later on, I wrote a second solution for the task that, for my understanding, should take quite a bit longer to run, but the code seems more logical to me. In the end, timing doesn't really differ? (See Benchmarks below)
You can still find the old version on one of the earlier commits.
Benchmarks
On my machine, a Ryzen 7 4700, using plain time for running, without build time. All times in seconds, max from three runs.
| Day | Task | User | Sys | Total |
|---|---|---|---|---|
| cmd/hello.go | - | 0.10 | 0.05 | 0.570 |
| 1 | 1 | 0.11 | 0.06 | 0.067 |
| 1 | 2 | 0.12 | 0.05 | 0.062 |
| 2 | 1 | 0.25 | 0.06 | 0.211 |
| 2 | 2 | 0.53 | 0.06 | 0.468 |
| 3 | 1 | 0.12 | 0.06 | 0.065 |
| 3 | 2 | 0.11 | 0.06 | 0.065 |
| 4 | 1 | 0.12 | 0.06 | 0.065 |
| 4 | 2 | 0.14 | 0.06 | 0.082 |
| 5 | 1 | 0.10 | 0.05 | 0.072 |
| 5 | 2 | 0.11 | 0.05 | 0.064 |
| 6 (old) | 1 | 0.11 | 0.06 | 0.066 |
| 6 (old) | 2 | 0.11 | 0.06 | 0.069 |
| 6 (new) | 1 | 0.12 | 0.05 | 0.064 |
| 6 (new) | 2 | 0.11 | 0.05 | 0.063 |
| 7 | 1 | 0.10 | 0.06 | 0.065 |
| 7 | 2 | 0.10 | 0.06 | 0.070 |