Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I love doing optimizations like this but I don't really have enough time anymore to really do it. In 2020 I spent a fair amount of time writing super optimized solutions for the first 10 or so days (repo solving all those days together in 150us i.e. <1ms) but even back then, I eventually stopped since I had other things to do and it took more and more time as the days went on.
My goal is "blink of an eye" solutions, so anything less than 100ms (for both parts on one CPU) is fine and I don't usually optimize it further. If it is more than that, I comment on it in my git commits to publicly shame myself a little, but I won't lose any sleep over it. So far I have three days where it took more than a second but less than a minute.
I'm using Python so I'll never be as fast as the people using Rust or C, but am still able to solve most puzzles in under 1 second (repo: https://github.com/wimglenn/advent-of-code-wim).