Recursion vs. work list
dabrahams opened this issue · 1 comments
dabrahams commented
Recursive algorithms that can't tail-call optimized can still be implemented without recursion by using an auxiliary work list (essentially replacing the call stack with a dynamically allocated array). It would be useful to see some discussion of the tradeoffs inherent in that approach.
IAmAThousandTrees commented
agreed. I do this all the time, it's super effective.