[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Efficient XSLT range lookups / questions

Subject: Re: Efficient XSLT range lookups / questions
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Tue, 05 Oct 2010 22:16:48 +0100
Re:  Efficient XSLT range lookups / questions
It would be interesting to see how much speed-up you can get by using integer comparisons rather than untypedAtomic/double comparison. I would imagine that doing

<xsl:for-each select="t">
<xsl:variable name="t" select="xs:integer(.)"/>
<xsl:choose>
<xsl:when test="$t lt 15">
      etc

could give a significant improvement.

Michael Kay
Saxonica

On 05/10/2010 6:58 PM, Hermann Stamm-Wilbrandt wrote:
Hello,

I got notice of an interesting scenario needing a huge amount of range
lookups in XSLT (billions per year with more than 20000 different ranges).


My web searches prior to this only showed range lookups of complexity linear in the number of ranges to be searched. I am sure that my searches are not perfect and I just missed relevant postings. Are there any relevant postings?


Since the ranges change rarely precomputing was a good option.


I compared binary search trees against stylesheets with a binary search
structure.

Findings based on experiments with saxon9he and DataPower XSLT processor
[1]:
- binary outperforms linear
- binary stylesheets outperform binary XML searchtrees
- in case the XSLT processor supports document and/or stylesheet caching
   the lookup performance remains good even for single lookups (logarithmic
   in depth of search tree; DataPower supports both, and web searches
indicate
   that .net framework also supports document/stylesheet caching)

Are there even better alternatives for doing quick range lookups?


[1] "Efficient XSLT range lookups" https://www.ibm.com/developerworks/forums/thread.jspa?threadID=348576&tstart=0


Mit besten Gruessen / Best wishes,


Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
Fixpack team lead
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research&  Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.