I'm writing some code that seems like it would be simpler to express using a recursive method (it's a read-only tree walk) and I'm wondering if there are significant performance differences between recursive algorithms and non-recursive ones.
I had the misfortune of learning about these initially in the context of Java, which meant such algorithms were highly emphasized even though they suffer significantly from stack overflow problems at high recursion depth.
I don't know what the trade-offs are when writing recursive algorithms in C, and I'd be interested to find out. I'm guessing stack overflow is still an issue, if somewhat harder to achieve, but could be mitigated by allocating a larger stack?
(Now that I think about it, I should probably just write the non-recursive version and do a performance comparison with the hardware clock. Maybe I'll do that and post the results.)