Re: Optimisation (was Re[6]: Aggregate)

Subject: Re: Optimisation (was Re[6]: Aggregate)
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Fri, 17 Nov 2000 15:07:47 +0000

>> Mike, is it possible for you to sketch out the optimisations in Saxon
> The ones that are relevant here are, I suppose, those that find an
> algorithm for evaluating an expression that has lower complexity
> than the naive algorithm.
> Some examples:

Thank you for those. As a stylesheet author, my main concern is to
construct XPath expressions that Saxon will recognise as optimisable.
For example, you say:

> $x[1] naively requires a comparison on each element of the list to see if
> its position is equal to 1 (so it would be O(X)). Saxon just looks at the
> first element, which is O(1).

Does Saxon recognise XPaths with more than one predicate to apply
this?  For example:


If Saxon only recognised that it could optimise when the [1] appeared
at the end of an XPath, then it might be beneficial to use an
intermediate variable in the second and third examples.

It's that kind of thing that I'm really interested in, if you have any



Jeni Tennison

 XSL-List info and archive:

Current Thread