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

Re: how to estimate speed of a transformation

Subject: Re: how to estimate speed of a transformation
From: David Tolpin <dvd@xxxxxxxxxxxxxx>
Date: Thu, 11 Dec 2003 14:54:49 +0400 (AMT)
david tolpin
> 
>   one should have the right to expect that for each n the computation is performed
>   once, and if a template is called with the same value of 'n' repeatedly, it does not
>   spend time on computing doctitle again.
> 
> The system doesn't have to re-calculate; it could cache the values so if
> it sees the same n again, simply re-use it.
> 

That's clear and obvious. What kinds of expressions and when are 'cached' in each
of the available processors? 

Since such 'caching' changes computation complexity, what features should expressions
possess to be safely used in this way? 

For example, for each node in a sequence, will computing following-sibling::*[name()=name(following-sibling::*[1])][2]
take twice more time than following-sibling::*[name()=name(following-sibling::*[1])][1]? Or will it take almost
the same time? What about 200 and 100 instead of 2 and 1?

Results are different with different processors, with constant time in the best case,
quadratic time in the worst one.

- Is the same time a feature of the language or a clever optimization? 
- Can I rely on constant time for this expression in my stylesheets? What if in a later
  version of the same processor this optimization will be dropped due to other concerns?

Stylesheets can be long and sophisticated. If it becomes too slow, is it a bug in the algorithm
or in the processor?

David Tolpin

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.