Subject: Tail recursion (WAS: Grouping problem?)
From: "Conal Tuohy" <conalt@xxxxxxxxxxxxxxx>
Date: Wed, 23 Apr 2003 20:03:01 +1200
|
Dimitre wrote:
>You can use a DVC (Divide and Conquer) style algorithm here. Split a
>node-set into two and recursively solve the problem on them.
<snip/>
>The recursion depth of a DVC algorithm is only log2(N).
>
>http://www.topxml.com/code/default.asp?p=3&id=v20020107050418
OK - log(n) is better than (n), but why use a DVC algorithm to minimise
stack-depth if a tail-recursive algorithm would eliminate the procedure
stack altogether?
Does anyone have details of processors that implement optimised
tail-recursion, and under what circumstances?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|