[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: problem: recursive templates slowing xalan process
> I read in another post that tail recursion performs better because > internally some processors convert it from recursion to looping. Are > there other reasons processors fare better with tail > recursion as well? > When the last thing that a template does is to call another template (or itself), then instead of making the call and then unwinding the stack, it is possible to unwind the stack and then make the call. This is actually true whether the call is recursive or not, but the benefits come with calls that are deeply recursive. It isn't faster (the same two operations are performed, but in the reverse order) but it avoids consuming stack space. Generally most XSLT processors run out of stack space at a recursion depth of 500 or so. Michael Kay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|