Discussion thread for day 6 of the Advent of Code - https://adventofcode.com/2024/day/6
Was too tired to post this in the wee hours of the morning when this FINALLY finished running... if I don't sleep, why should my computer be allowed to? (Note: this took even longer than it needed to as I FORGOT to disabled my computer's ability to go to sleep after set intervals until part way through... Part 1 runs in a couple seconds at least... doing so thousands of times however for part 2...)
My solution...
I went on a trip, and by the time I came back, the answer was output (it took about 3 hours).
part 1: 2 mins > 9 seconds
part 2: 12 hrs > 1hrs > 10 mins
python take 15 seconds without any optimise, but alteryx is take forever, so it may a good to use python sometimes. to reduce the run time.
Not smart, but it worked.
Ugly but got the job done! Part 2 took 1 hr, 47 min to run.
Part 1 macro:
Part 2 macro - Outer macro (should've been a Batch but I did it as Iterative)
Inner macro:
This is the beginning of the days where the runtime is horrendous - this one took multiple hours to run.
All solutions at SeanAdams10/AdventOfCodePython: Advent of code challenges in Python - across multiple years
For everyone who has a working solution - esp @gawa and @CoG and @mmontgomery and @DataNath - have you run procmon to see what Alteryx is doing that causes it to run in such a long runtime compared to doing this in code. This is the key to helping Alteryx to optimize the power of macros. this is my next task for day 6, to figure out what's causing the run-time difference.
For example:
- Day 6 part 1 in Alteryx with AMP turned on (multi-threaded): 1m48 sec (yes - I am a bit bashful since others have done part 1 so quickly)
- Day 6 part 1 in code: 0.012 seconds on a single thread
that's a factor of 9000x. Even taking some of the faster runtimes posted by folk (like 1 sec or so) - that's still a factor of 100 difference with very heavy optimization
so there's something going on in each of our machines that is generating workload for the PC which may not be needed - this may be a really valuable example for us to dive into as a group to see if we can spot what's happening and create a few ideas on the community to performance tune macros.
here's a guide for how to get started with ProcMon:
https://chatgpt.com/share/6759637c-7fb0-8007-a05f-bfd08f0557f9