[xquery-talk] General comparisons of speed of xquery vs. xslt

Michael Kay mhk at mhk.me.uk
Mon Apr 26 20:11:57 PDT 2004

> Is there any justification to believe that xquery implementations have
> the potential to be more "performant" than xslt implementations?

I think that XQuery has better ability to be optimized to use indexes in the
situation where you have a large collection of pre-loaded and pre-indexed
documents and you want to evaluate the query without scanning all the data.

If you're transforming single documents, or small numbers of documents,
loaded as part of the transformation operation, then I don't think XQuery is
intrinsically likely to run faster than XSLT. On the contrary, XSLT has
xsl:key which is designed to maximize performance in this scenario, and
which is not available in XQuery.

People will use XQuery to do single-document transformations in cases where
(a) it saves them learning another language, or (b) they have taken a
dislike to XSLT's syntax; but they will be losing a lot of functionality by
doing so, and I don't think they will be gaining any performance.

Michael Kay

More information about the talk mailing list