Papey
Avent of Code 2020 - Day 23
This topic is about Day 23 of the Advent of Code 2020 .
Thanks to @egze, we have a private leaderboard:
https://adventofcode.com/2020/leaderboard/private/view/39276
The join code is:
39276-eeb74f9a
Most Liked
bossek
bjorng
Getting rid of the back links reduced the running time from 80 seconds to 40 seconds on my computer as well as simplifying the code. I didn’t bother doing any more optimizations.
My implementation takes 22 seconds on my machine, so I’m interested if anyone got good performance without resorting to native code.
I have not tried it myself, but I would expect that using the atomics module would give a nice speedup.
bjorng
That is 2.7 seconds on my computer. Nice!
![]()
hvnsweeting
Part 1 is simple with list but that would take forever to run part 2. I also tried paper and pencil to calculate as it seems to have some pattern, failed to this. Then I tried to speed up code of part 1,end up implementing a fast linked list.
cblavier
Well done @bossek, I had an impressive performance bump when switching from Map to :atomics (from 40sec to 2sec)
Here is my refactoring commit. Impressed on how such a few line change can make a big difference.







