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

Re: How to output open/close tags independently?

Subject: Re: How to output open/close tags independently?
From: Mitch Amiano <mitch.amiano@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Dec 2002 18:11:53 -0500
Re:  How to output open/close tags independently?
Interesting. My poor system has but 128 meg of ram. I did run it several times to check, but I wouldn't claim anything is configured optimally.

Dimitre Novatchev wrote:

"Mitch Amiano" wrote in message

Not surprisingly, the second transform took about 5 times longer to

run (83.34 seconds on w2k/saxon6.5.1/750mhz) than the first one (17.46 seconds) (and Windows complained about my virtual memory usage). Not to mention that the first transform is a smaller amount of code.

- Mitch



Hi Mitch,


My results are *very different*. With your set of 1000 elements

On Saxon 6.5.2 I have:
---------------------
non-resursive:   0.251 sec
recursive:       0.280 sec

It was more than a year ago when Mike Kay explained that Saxon
optimises tail recursion implementing it with iteration. This explains
the result.

On MSXML4 (, which does not optimise tail-recursion) the results are:
----------
non-recursive:   0.005 sec.
recursive:       0.046 sec.

so the recursive variant ran 9 times slower.

However, there's a DVC variant (Divide and Conquer, see for example
http://www.topxml.com/code/default.asp?p=3&id=v20020107050418&ms=60&l=xsl&sw=lang),
which allows recursion to run much faster. With it the results were:


Saxon 6.5.2: ----------- non-resursive: 0.251 sec recursive: 0.280 sec DVC: 0.280 sec


MSXML4: ------- non-recursive: 0.005 sec. recursive: 0.046 sec. DVC: 0.014 sec.


My computer is a 1.7 GHz W2K Pentium with 256MB of memory. This is the reason for the faster times.

However, the difference in speed cannot explain the very different
ratio of recursive / non-recursive reported by you for Saxon.

Here's the code I used (copied your code and added the DVC one):
----------------------



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.