Skip to content
Prev 35487 / 63421 Next

R-devel Digest, Vol 83, Issue 2

Simon Urbanek wrote:
I think Laurent was referring to RecursiveRelease, which could use a lot 
of C stack if you choose to release something that is deep in the list, 
since it checks the head, and if that doesn't match, calls itself again 
on the rest of the list.  (I checked, and at least one version of gcc 
doesn't recognize the tail recursion:  it really does generate a 
recursive call.)

Laurent asked why it isn't optimized to avoid the recursion:  I think 
the answer is simply because it is so rarely used that nobody has bothered.

Duncan Murdoch