r/adventofcode • u/daggerdragon • Dec 12 '16
SOLUTION MEGATHREAD --- 2016 Day 12 Solutions ---
--- Day 12: Leonardo's Monorail ---
Post your solution as a comment or, for longer solutions, consider linking to your repo (e.g. GitHub/gists/Pastebin/blag/whatever).
Note: The Solution Megathreads are for solutions only. If you have questions, please post your own thread and make sure to flair it with "Help".
MUCH ADVENT. SUCH OF. VERY CODE. SO MANDATORY. [?]
This thread will be unlocked when there are a significant number of people on the leaderboard with gold stars for today's puzzle.
edit: Leaderboard capped, thread unlocked!
8
Upvotes
View all comments
Show parent comment
1
u/askalski Dec 12 '16
Yesterday's wall of text was not a welcome sight to my sleep-deprived eyes, so I closed the laptop and put myself on a strict "sleep, then solve" diet effective immediately.
I'm glad to see somebody made a decompiler for this. What's especially nice about this solution is the C compiler is able to optimize away 4 out of the 5 loops. (The remaining loop, of course, iterates over the Fibonacci numbers, and I'm not aware of an x86-64 instruction for that.)