Anže's Blog

Python, Django, and the Web

12 Dec 2025

Advent of Code 2025 🎄

December is the time for Advent of Code, as it has been since 2015, when the first Advent of Code event was published.

This year, Advent of Code only had 12 days instead of the usual 25. To me, this was a relief. I always get competitive and then start waking up at 5 am every day to get more points on the leaderboards. I did the exact same thing this year as well, of course, but at least I only did it for 12 days!

And yes, my sleep score suffered, but I was happy with my results. So it was all worth it, right?

Sleep score graph showing a drop in sleep quality when Advent of code started

Personal times

My personal times were surprisingly good! I only ended up oversleeping once (day 8):

Day   -Part 1-   -Part 2-
 12   01:09:09   01:10:14
 11   00:16:00   00:23:47
 10   00:16:00   00:48:30
  9   00:14:21   00:53:24
  8   02:17:08   02:26:17
  7   00:17:22   00:25:13
  6   00:10:12   01:24:39
  5   00:14:06   00:25:28
  4   00:20:31   00:23:34
  3   00:27:38   00:54:27
  2   00:10:53   00:18:37
  1   00:10:42   00:57:21

I managed to do most of the days within an hour! Still way too slow for the global leaderboard, if it was available this year (good riddance, imo), but I’m happy with my results.

Community!

The main thing for me is the lovely community around /r/adventofcode.

The subreddit was flooded by visualizations, memes, and insightful posts every day. The memes were top-notch, and I really enjoyed lurking in the subreddit after I finished solving the day.

I also want to give a huge shoutout to Rodrigo, who live-streamed explanations for solutions each day. If you got stuck at some point, find his video, and you’ll learn a lot!

So to sum up, if you are doing Advent of Code on your own, you are missing out. Find a group of people to share the experience with. It’s fun comparing solutions, sharing struggles, and boasting when your solution is 0.2ms faster than your friend’s!

Benchmarks!

Speaking of comparing solution run times, this year my goal was to have solutions for every day that finish in less than 100ms. Just to show everyone that Python isn’t that slow!

I am also happy that I managed to reach this goal:

Day Variant Status Part 1 Time Part 2 Time Total Time
01   0.45ms 🟢 0.54ms 🟢 0.99ms 🟢
02   0.07ms 🟢 0.12ms 🟢 0.19ms 🟢
03   0.31ms 🟢 0.80ms 🟢 1.11ms 🟢
04 numpy 0.67ms 🟢 3.69ms 🟢 4.36ms 🟢
04   4.99ms ⚪ 12.64ms ⚪ 17.63ms ⚪
05   0.23ms 🟢 0.08ms 🟢 0.31ms 🟢
06   0.68ms 🟢 1.03ms 🟢 1.71ms 🟢
07   1.06ms 🟢 1.28ms 🟢 2.34ms 🟢
08 numpy 5.60ms 🟢 2.31ms 🟢 7.91ms 🟢
08   410.11ms ⚪ 421.54ms ⚪ 831.65ms ⚪
09 numpy 0.79ms 🟢 83.24ms 🟢 84.03ms 🟢
09   9.80ms ⚪ 142.66ms ⚪ 152.46ms ⚪
10 numpy 2.29ms 🟢 49.08ms 🟢 51.37ms 🟢
10   172.86ms ⚪ 238.10ms ⚪ 410.96ms ⚪
11   0.28ms 🟢 0.64ms 🟢 0.92ms 🟢
12   0.95ms 🟢 - 0.95ms 🟢
Total     13.38ms 🟢 142.81ms 🟡 156.19ms 🟡

Legend:

(The table was generated by adventofcode PyPI package)

Unfortunately, I wasn’t able to get the total time for all days under 100ms, mostly because days 9 and 10 were brutal, and I couldn’t get them down to a reasonable time. The meme from /r/adventofcode describes the situation very well:

Days 1-8 a cute Labrador. Days 9 & 10: a black monster. Day 11, a cute Labrador, and the same for day 12

It was a shame because all the other days together took less than 10ms to finish! Which I think isn’t bad for using a language that is supposedly too slow! Although I must admit that a few of the solutions did require numpy/scipy to reach <100ms.

All the solutions are in my adventofcode2025 repository.

🤖

I decided not to turn off AI autocomplete for solving the initial puzzles. I think we are going to rely heavily on AI from now on, so the sooner we get comfortable with it, the better.

I didn’t use agentic features for getting the initial solution. If the AI could figure out I’m doing DFS while I was typing it out, then fine, I’ll accept the suggestion as long as I didn’t explicitly ask it to write the DFS algorithm for me.

Once I had a full solution, I used Agent mode to ask the AI to optimize the solutions. Especially if my version was too slow.

I was blown away by how well this worked. Yes, the AI would sometimes mess up and get the result wrong, but then it would recover and find a solution that would leave my original solution in the dust.

I don’t think I could have reached my goal of less than 100ms per solution without AI’s help. To get to it, I’d have to sink way more time into this than I have available.

I’m still not onboard with the whole vibe coding mentality because the code that the AI produces is unmaintainable, but if you give it a well-defined problem, it will surprise you, so don’t shy away from trying it out!

My adventofcode PyPI package

The benchmarks above were generated by my adventofocode PyPI package, which I first wrote back in 2023 to help me automate tedious tasks like downloading the puzzle input, asserting that example inputs return the correct results, and finally submitting the answer after all the sample cases pass.

I ended up pushing 13 releases from Nov 29 to Dec 12. I still have a few bugs to fix and some rough edges to clean up, and I promise those will all be addressed just in time for Advent of Code 2026!

Happy holidays

I have gotten so used to finishing Advent of Code on Christmas morning that I feel like the only appropriate thing to do is to move the holiday. From now on, I am expecting presents on the 12th instead of the 25th, Santa, I hope you are listening! 🎅

Happy holidays to everyone, and see you in 2026!