Jan van der Lee wrote:
> Interesting: a relatively simple XSL (1.0) transformation on a
> relatively large XML file (several Mb) is about 1.8 times faster with
> Saxon 7.7 than with Xalan 2.5.1. Saxon is exactly 5 times faster than
> 4xslt (based on python).
Which version of 4Suite did you test with? It can make a huge difference.
Saxon will probably still "win", but I'm willing to bet it won't be by a
factor of 5. I doubt people tend to choose based on speed alone, though.
Comparing processors that aren't really usable in the same environment is
is an academic exercise, since the average Java application developer is
not going to consider a Python-based processor to be an option.
FYI, 4XSLT is mostly Python, but parts are implemented in C, for speed: the
XML parser (Expat), the source & result tree implementation, parts of the
XML/HTML serializers, the XPath expression parser, and a couple other odds
& ends. Also note that Python, like Java, has interpreter overhead, and
garbage collection is not aggressive, so your benchmark methodology may
need some adjustment.
If speed is all you care about (hopefully it isn't), be sure to try the
venerable XT, or the major C-based processors: MSXML, Sablotron, and libxslt.
Anyway, if you send the XML and XSLT files (zipped), I'd like to test and make
sure we didn't miss a major bottleneck before the upcoming 1.0 beta release.
Email me off-list, please.
- Mike (one of the 4Suite developers)