|
![](/i/fill.gif) |
On 4/26/2012 5:09, Warp wrote:
> Very usually the recursion depth of a typical recursive algorithm is
> O(log n). This means that the computer wouldn't be able to hold as much
> data as to make you run out of stack space when running the recursive
> algorithm on it.
Assuming that you're not writing a library that might invoke you 40 levels down.
That said, I've found I rarely need it, and that the undefined behavior
isn't worth the risks. YMMV. If you can handle the program crashing when you
give it too much data in a way that generates bogus results, then sure, feel
free. :-) (I'm not being sarcastic - there are lots of programs like that.)
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
![](/i/fill.gif) |