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

Re: Newbie question on XSL transformations: multiple

Subject: Re: Newbie question on XSL transformations: multiple sorts on element attr
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 08 Feb 2007 10:37:47 +0100
Re:  Newbie question on XSL transformations: multiple
Ronan Klyne wrote:
(Hello)

Are there any published numbers anywhere to demonstrate this?

And do you mean that XSLT2.0 allows you to write faster code, or that
the processors are better?

Ronan

It is not that trivial, because the languages differ so much. I am not sure about published figures, but I remember a post on this list by Dimitre Novatchev (I hope I am right about the poster's name) who showed with FXSL a magnitude of performance gains.


That said, a simple example shows what can be achieved and why it is so significant. In XSLT 2, you can write "replace($value, "someString", "someOtherstring"), to replace all occurrences of 'someString' with 'someOtherstring' in the value $value (these can be regular expressions, but parsing a regex in XSLT 1 is so utterly complex and time consuming, the comparison wouldn't be fair). The same replace will take a recursive template in XSLT 1.

Even without running the tests, you can imagine that XSLT 2 processor designers can optimize a single function with strict semantics much easier than they would with a complex recursive template.

Similar performance gains are made with XSLT having a new type system, with strong typing and sequences, which both were not there in XSLT 1. Not having a Node type just about everywhere makes for pretty amazing performance gains.

There are very many examples of XSLT 2 outperforming XSLT 1. But comparisons are hardly fair, as it almost feels like comparing a calculation program written in MS DOS Batch language (yes, it can be done!) to one that is made in JavaScript. Both are interpreted, but the languages differ a lot in their capabilities making comparising both look bad.

-- Abel

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.