xsl-list
[Top] [All Lists]

Tail recursion (WAS: Grouping problem?)

2003-04-23 01:03:01
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



<Prev in Thread] Current Thread [Next in Thread>