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

Re: xpath // query

Subject: Re: xpath // query
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Wed, 24 Apr 2002 05:51:09 -0700
Re:  xpath // query
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 24 April 2002 05:26, Aleksander Dye wrote:
> select="A//C"
> select="A//B//C"
>
> when I know that <B> is *guranteed* to be there (both select the same
> nodes).  By adding the test for <B>, will it make the selection any faster?

Now, take whatever I say with a grain of salt because I haven't actually 
implemented a processor or tested this.  But it seems like the first might 
actually be faster, because when using the second expression, each node under 
<B> would probably be tested to see if it is a <B> *or* a <C>, while in the 
first expression only the test for <C> must be made.  This may or may not be 
the case, depending on how smart/dumb your processor is.

On the other hand, if you were able to limit the '//' such as A/*/*/B//C, then 
it would certainly be faster, but it sounds like this is not possible.

Remember that the only way to really find out for your given processor (and I 
am sure it varies between processors) is to profile the actual runtimes.

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8xqpBNSZCJx7tYycRAnPzAJ4xvg5UaDM4FzEWL0aIqHYa4UuRawCfTqA9
I1UlHQ34t2plQqDa2len5gE=
=Ihtc
-----END PGP SIGNATURE-----


 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.