aoc2022
Advent of Code 2022 (by ednl)
aoc2022
My own personal overengineered helpers to solve AoC problems in Rust (by udoprog)
Our great sponsors
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
aoc2022
Posts with mentions or reviews of aoc2022.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-26.
-
[2022 Day 15 (Part 2)] [Python] I wrote a really fast solution for day 15 part 2 (less than 1ms). What do you think of the algorithm I came up with?
I also checked lines but only after doing a rotation by 45 degrees, so the lines are straight. Compiled in C, fastest run time on M1 was 26 ยตs: https://github.com/ednl/aoc2022/blob/main/15.c
-
-๐- 2022 Day 15 Solutions -๐-
Not sure if anybody already did this, but I used an integer rotation of 45 degrees to the left to check for the gap of 1 between sensor ranges and then rotated back to the right. Both rotations also multiply everything by a factor of sqrt(2) (for a pure rotation you would divide by that factor but fractional grid coordinates are no good), so to go back to original coordinates you need to divide by 2 in the end. This made the search pretty straightforward. Runs in 26 ยตs on Apple M1 and 126 ยตs on Raspberry Pi 4. See at the top of my source code for how I measured that.
Same code but with preprocessed input to make it all fit into memory, runs in 7 ms on an Arduino Uno! https://github.com/ednl/aoc2022/blob/main/aoc22-15/aoc22-15.ino
-
-๐- 2022 Day 13 Solutions -๐-
Complete program runs in 463 ยตs on Apple M1, 2.61 ms on Pi 4. See comments at the top of the source file for how I measured. My comparison function:
-
-๐- 2022 Day 12 Solutions -๐-
Full source code Straightforward BFS with a simple own implementation of a queue. Only clever bit was to simply use End as the start position for part 2 and change the finish condition:
-
[2022 day 11][C] Benching Monkeys
Not 100% sure this is Upping-The-Ante, maybe just Other. I wanted to share some benchmark results of my solution for today, day 11 with the 10,000 monkeys, and how I got there. I think the easiest way to compare performance is to use the same hardware, and nowadays fairly common & standardised hardware might be the Raspberry Pi 4. Although, you can't buy any for years now... Best score I got when running my solution on my Pi 4 home server is 15.6 ms.
-
-๐- 2022 Day 11 Solutions -๐-
I quickly saw that I could do "item = item modulo (product of all div-test numbers)" but the implementation took me a while in C without queues or circular buffers. But that's all part of the fun for me! I didn't look for further clever optimisations because the compiled program runs in 20 ms on a Raspberry Pi 4. That was fast enough for today, I thought. Source code: https://github.com/ednl/aoc2022/blob/main/11.c
-
-๐- 2022 Day 10 Solutions -๐-
Yay, embedded software engineering!! :) Short, fast & almost no memory needed in C: https://github.com/ednl/aoc2022/blob/main/10.c or the relevant bits:
-
-๐- 2022 Day 9 Solutions -๐-
It took me very long in part 2 to realise that I had to take one step at a time for every knot. I had built it to move Head all the way, then move Knot1 all the way to Head, then move Knot2 all the way to Knot1, etc. That this was wrong WAS visible in the result of example 2, but my method gave the same answer 36 and it had only ONE different visited location on the whole grid, which I totally missed. Gah. Source: https://github.com/ednl/aoc2022/blob/main/09.c
aoc2022
Posts with mentions or reviews of aoc2022.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-12-12.
-
-๐- 2022 Day 13 Solutions -๐-
Late start today as well. I really thought today would be the day that I'd have to abandon my goal of no heap allocations. But, luckily I had an arena allocator available that I could fairly easily adapt to store data on the stack. And with some tweaks we have today's solution:
- -๐- 2022 Day 9 Solutions -๐-
-
-๐- 2022 Day 8 Solutions -๐-
Link to repo: https://github.com/udoprog/aoc2022/blob/main/years/2022/src/bin/d08.rs
-
-๐- 2022 Day 5 Solutions -๐-
Repo Link
-
-๐- 2022 Day 4 Solutions -๐-
Link: https://github.com/udoprog/aoc2022
- -๐- 2022 Day 3 Solutions -๐-
What are some alternatives?
When comparing aoc2022 and aoc2022 you can also consider the following projects:
rust-mos - Empowering everyone to build reliable and efficient software.
AOC2022 - Advent of Code 2022, solved in Haskell
AdventOfCode - My solutions to Advent of Code
aoc-go - A Golang tool for generating code for Advent of Code
aoc - KlongPy Advent of Code (AoC) solutions
AdventOfCode2022
AdventofCode2022 - My Advent of Code 2022 solutions in Kotlin
aoc2022
Advent-Of-Code-2022 - AoC Solutions in Idris
advent-of-golf-2022 - Golfed code for Advent of Code 2022
jellylanguage - Jelly is a recreational programming language inspired by J.
adventofcode - Advent of Code solutions