Join the Inspire AMA with Joshua Burkhow, March 31-April 4. Ask, share, and connect with the Alteryx community!

General Discussions

Discuss any topics that are not product-specific here.

Advent of Code 2024 Day 6 (BaseA Style)

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team

Discussion thread for day 6 of the Advent of Code - https://adventofcode.com/2024/day/6

22 REPLIES 22
gawa
16 - Nebula
16 - Nebula

@SeanAdams As I've been interested in the performance of AMP, thank you for sharing this toping.

When it comes to Iterative Macro, handover of iteration record from previous to next iteration should be one of the factor of slow running time, I suppose. As a first step, I investigated the running time of Day6P1 under the several conditions. I will figure out why running speed varies and what's going on with help of ProcMon (I installed ProcMon in my computer just now. Thank you for introducing it.).

Engine

1 process in Macro

(164 iterations)

2 process in series in Macro

(82 iterations)

3 process in series in Macro

(54 iterations)

Non-AMP 2.1 sec 2.0 sec 2.0 sec
AMP 3.2 sec 2.2 sec 2.0 sec
AMP w/ compatibility mode 3.2 sec 2.2 sec 2.0 sec

 

Terminology:

'2 process in series in Macro' is to arrange the same process in series to reduce the necessary iteration number into half.

image.png

Likewise, '3 process in series in Macro' is like this. The necessary iteration number is one-third.

image.png

estherb47
15 - Aurora
15 - Aurora

After many different approaches and endless looping (a specialty of mine), I finally got Part 1 to run in 22.5 seconds.

Somewhere in the back of my mind, Digan was reminding me to minimize what I actually send through the iterative macro, so only sent the next location of the guard after moving (while outputting all of the steps taken in that movement)

More on this later. On to read Part 2.....

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Finally...

But it is good to see the iterative macro runs in shorter time as the iteration goes on :)

Now it runs in 14:04 minutes for Part 1 & 2 combined.

 

Spoiler
Workflow
workflow.png

 

 

Labels