[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 Carlisle <davidc@xxxxxxxxx>
Date: Thu, 11 Dec 2003 09:42:14 GMT
time cost trade off


  <xsl:template name="footer">
    <xsl:variable name="doctitle" select="/book/descendant::title[1]"/>

  the programmer should expect that the computation takes place only once.
  Moreover, if it takes the form 

I seem to remember discussion on this list before now whereby some
systems will evaluate that no times (if the variable isn't used) or just
once, or each time it is referenced, depending on heurstics trying to
trade off cost of computation against cost of storing teh result.
One of the advantages of a side effect free langage is that you have
the choice of recalculating rather than storing.

  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.

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. 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


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.