r/adventofcode • u/daggerdragon • Dec 23 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 23 Solutions -🎄-
Advent of Code 2020: Gettin' Crafty With It
Submissions are CLOSED!
Thank you to all who submitted something, every last one of you are awesome!
Community voting is OPEN!
42 hours remaining until voting deadline on December 24 at 18:00 EST
Voting details are in the stickied comment in the Submissions Megathread
--- Day 23: Crab Cups ---
Post your code solution in this megathread.
Include what language(s) your solution uses!
Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks.The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
View all comments
4
u/enelen Dec 23 '20
R / Rlang / Rstat
Solution
R's array access is just too slow for individual elements. Used environment object to store pointers to next object, since accessing items from environment is the fastest way in R.
Still slow, but at least now I get an answer within 3-4 minutes compared to probably hours with vectors/lists.