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

Re: Is this node, the document root... best test?

Subject: Re: Is this node, the document root... best test?
From: Stephen Cunliffe <scunliffe@xxxxxxxxxxxxxxxxxx>
Date: Mon, 20 Oct 2003 12:46:50 -0400
stephen cunliffe
I'm not sure what's holding up my posts (I see responses before I see my post ;-) but,

I thought I'd post my findings on a quick n dirty test...

testing every node in an xml document,...
...start timer 1,
...30 times <xsl:if test=". = /"><!-- just time test --></xsl:if>
...stop timer 1,

...start timer 2,
...30 times <xsl:if test="not(parent::*)"><!-- just time test --></xsl:if>
...stop timer 2,

compare timers...

I found that the first test (timer 1), was routinely 10-30ms faster than the second.
Note:
- my test nodes were between 0-7 levels deep, 500-1,000 nodes in total...
- obvious gc / memory cleanup results were omited
- timer execution times are included, but pressumed minimal, and relatively average.


Cheers,

Steve


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.