xsl-list
[Top] [All Lists]

Re: Re: Grouping / Count Issue

2005-12-06 03:16:44


  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.

David

________________________________________________________________________
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:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>