Post AcTknRoydvDbFPzFY0 by urda@urda.social
 (DIR) More posts by urda@urda.social
 (DIR) Post #AcTQ2aZOIetrgg4ioq by tek@freeradical.zone
       2023-12-04T18:00:58Z
       
       0 likes, 0 repeats
       
       Day 4, Python:Problem 2 first iterative attempt: 1430ms.First recursive attempt: 1100ms.Tweak to make it dynamic: 37ms.There might be some cleverer pure-math method. Don't care, fast enough.
       
 (DIR) Post #AcTWDdjpSZUQQMbtmC by kalak451@freeradical.zone
       2023-12-04T19:10:10Z
       
       0 likes, 0 repeats
       
       @tek I stick with nice functional streaming stuff with complete immutability for as long as I can.  Then as soon as its faster for me to think of,  everything becomes mutable and its loops everywhere!
       
 (DIR) Post #AcTXFI8OqvmvxGSEuu by tek@freeradical.zone
       2023-12-04T19:21:42Z
       
       0 likes, 0 repeats
       
       @kalak451 That seems to be the way.In my case, “dynamic” meant slapping a cache decorator on the recursive function and calling it a day.
       
 (DIR) Post #AcTgBrzOVExJaMgYZk by urda@urda.social
       2023-12-04T21:01:56Z
       
       0 likes, 0 repeats
       
       @tek I don't produce times (I should but lazy) here's my Day04 Part 2 https://github.com/urda/advent-of-code/blob/1cb691e4aef85423553247fad53f3370a484d178/aoc/src/advent_years/y2023/day_04/day_04.py#L59-L81
       
 (DIR) Post #AcThhWaLiYL8QId3Fg by tek@freeradical.zone
       2023-12-04T21:18:51Z
       
       0 likes, 0 repeats
       
       @urda Nice. Here's what I came up with: https://gist.github.com/kstrauser/2c3f76ca3fc5009f67a650bffefc595d
       
 (DIR) Post #AcTknRoydvDbFPzFY0 by urda@urda.social
       2023-12-04T21:53:32Z
       
       0 likes, 0 repeats
       
       @tek it's so much fun seeing how others solve the day's problems. I usually go for a dirty “gotta score" answer, then I clean it before pushing to github haha
       
 (DIR) Post #AcTmH33XNqEB57TZBY by tek@freeradical.zone
       2023-12-04T22:10:06Z
       
       0 likes, 0 repeats
       
       @urda So much the same here.Step 1: Make it work at all.Step 2: Make it pretty.