[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Newbie question on XSL transformations: multiple
Ronan Klyne wrote:
(Hello) 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|