Re: [xsl] How to output open/close tags independently?

Subject: Re: [xsl] How to output open/close tags independently?
From: Mitch Amiano <mitch.amiano@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 31 Dec 2002 18:11:53 -0500
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