> But the following example does > not seem to show the hope-for speedup of tail recursion: In any case, I'm pretty sure we have had this conversation already. You don't get a time optimization because goto & has large overhead. See http://www.plover.com/~mjd/misc/tail-recurse.pl for example. > The slowness then characteristic speedup as @_ shrinks > indicates that tail recursion is not happening. It's not really clear what you mean by 'tail recursion is not happening'. The conclusion I would draw from this is that the goto-& operation is copying or relocating the argument vector, or performing some other operation that is O(n) in the size of the argument vector. But the stack remains constant size, as you can see from a perl -Ds trace.Thread Previous | Thread Next