This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Mike,

>> 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:
[snip]

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:

  $x[foo][1]
  $x[1][foo]
  $x[foo][1][bar]

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
tips.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]