RE: [xsl] Complex recursion in XSLT 1.0

Subject: RE: [xsl] Complex recursion in XSLT 1.0
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 21 Feb 2008 23:24:20 -0000
> Very interesting indeed. Does this mean also that a LILO 
> (last-in becomes last-out) stack is to be preferred against 
> LIFO (last-in becomes first-out) ...

No, not at all. It just means that when you map a logical Stack to an XPath
sequence, then in Saxon it might perform better if the "top" of the stack is
the last item in the sequence rather than the first. 

If you only access the stack using the functions provided (and of course
it's not encapsulated, so one can't enforce this) then it doesn't make any
difference to the correct functioning of your application either way.

It's only a conjecture about performance, which needs to be tested. When you
create a sequence by appending an item to an existing sequence, Saxon tries
under some circumstances to share the memory occupied by the original
sequence and avoid doing a physical copy. Such optimizations are possible of
course only because sequences are immutable.

Michael Kay
http://www.saxonica.com/

Current Thread