[xquery-talk] General comparisons of speed of xquery vs. xslt
email at edgillespie.com
Wed Apr 28 03:42:48 PDT 2004
Are you sure, that XSLT generally is faster than XQuery?
We did an independent benchmark.
1. Oracle XQuery implementation
2. Saxon XQuery implementation
3. Xalan XSLTC implementation
4. Saxon XSL implementation
We found that the Oracle XQuery implementation used with the Oracle Parser
was indeed the fastest. Oracle's implementation is far from being complete.
So we've chosen Saxon. Now, of all people to suggest that XQuery is slower,
I run across your posting :)
In the case of both XQuery implementations we are seeing results (100's of
milliseconds) better than using XSLT? Although this is not, necessarily, an
apples to apples comparison; the numbers have led us to believe that the
XQuery implementations are faster.
We also toggled between the Oracle XML Parser and Xerces.
We are doing an XML to XML transformation on one to thousands of documents.
The stylesheet is the same in all cases. However the xml data is different
in each transformation. Simply, we are doing single document
transformations. The sizes of the documents range from small to large.
From: Michael Kay [mailto:mhk at mhk.me.uk]
Sent: Monday, April 26, 2004 2:12 PM
To: 'Karr, David'; talk at xquery.com
Subject: RE: [xquery-talk] General comparisons of speed of xquery vs. xslt
> 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.
talk at xquery.com
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3208 bytes
Desc: not available
Url : http://xquery.com/pipermail/talk/attachments/20040428/584090df/winmail.bin
More information about the talk