Re: [xsl] Re: Grouping / Count Issue

Subject: Re: [xsl] Re: Grouping / Count Issue
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Dec 2005 10:16:44 GMT
  WOW ! Amazingly, it's 15 times faster than the one i found myself using deep
  XPATH and nested for-each. My solution takes about 15 seconds, david's first
  solution using keys for XSLT 1.0 takes about 5-6 seconds and the XSLT 2.0
  one takes 1 second.

Interesting figures. Using keys does in many cases change the time
complexity of the algorithm so it's not that it's 3 times faster but
rather 3 times faster with a document that size, 6 times faster with
larger documents etc..

Conversely I suspect that the xslt2 version is a linear speedup because
Michael's code gets more optimised over the years so in this case the
speedup probably is not so dependent on document size. As a comparision you
could run the xslt1 version with saxon8 I'd guess that would be a
similar speed to the "xslt2" version, which I didn't really write to be
quicker just as a more or less joke version to show you could (if you
were feeling peverse) write it as a single XPath. On the other hand,
while writing things as a single Xpath often looks strange to an old
time XSLT user, but it is essentially the definition of using Xquery.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread