Today's wasn't too bad I thought (https://gist.github.com/wence-/500e1bc4633192ac6fee67433aedd974#file-day12-py). I wrote the recursive implementation first and then hand-coded the stack which in python got me from 0.27s to 0.19s for part 2. The major saving was noticing that one doesn't actually need the paths, just the number of them, so it's sufficient to count paths rather than cons them up.
Today's wasn't too bad I thought (https://gist.github.com/wence-/500e1bc4633192ac6fee67433aedd974#file-day12-py). I wrote the recursive implementation first and then hand-coded the stack which in python got me from 0.27s to 0.19s for part 2. The major saving was noticing that one doesn't actually need the paths, just the number of them, so it's sufficient to count paths rather than cons them up.