[XML-SIG] Pyana 0.2.0 released

Brian Quinlan brian at sweetapp.com
Mon Dec 17 21:41:10 EST 2001


Uche Ogbuji wrote:

> > PIRXX is focused on providing Xerces XML services to Python. The
current
> > release of PIRXX provides SAX2 interfaces but I believe that Jürgen
is
> > working on DOM support.
> >
> > So, right now, Pyana is probably your best bet for high-performance
XSLT
> > processing in Python while PIRXX offers Xerces SAX2 interfaces.
> 
> Are you basing this on actual benchmarks?  In particular, I'd be
surprised
> if Pyana was faster overall than current CVS of 4XSLT, Since Xalan
isn't,
> as I measure it.

I am basing this on the timings of largish transformations that I was
doing around 2 months ago. Since then I haven't really compared them and
I have never run any formal benchmarks. 

Note that one of the big problems with timing Xalan from the command
line is that it is very slow to load, especially on windows. I just
timed "import Pyana" on my PIV 1.7GHz and it took 0.74s. But the beauty
of using Pyana instead of something like "popen('xalan ..." is that the
load time becomes a one-time cost for the application.

For fun, I just downloaded:
http://www.datapower.com/XSLTMark/download/XSLTMark_2_1_0.zip

And wrote the attached script. I did this without expending any effort
trying to understand the benchmark suite; I just test each .xml/.xsl
pair. Notice that all of the source/stylesheet documents are small so
the advantage should go to 4suite.

I don't want to get 4suite from CVS so why don't you get Pyana:
http://prdownloads.sourceforge.net/pyana/Pyana-0.2.0.win32-py2.1.exe
(very easy Windows installer for Python 2.1 [you can probably figure out
how to transform that URL for Python 2.0 ;-)])

Then you can run this script against Pyana and (with a few tweeks)
against 4suite. Here are Pyana's results on my machine:

C:\Dev\Me\Pyana\pyana\Test>python benchmark.py
time to import Pyana: 0.0785s # Cached by Windows?
time to execute axis: 0.0080s (675 bytes of output)
time to execute bottles: 0.0145s (12075 bytes of output)
time to execute brutal: 0.0156s (4191 bytes of output)
time to execute chart: 0.0110s (3837 bytes of output)
time to execute current: 0.0060s (320 bytes of output)
time to execute game: 0.0080s (457 bytes of output)
time to execute html: 0.0066s (504 bytes of output)
time to execute identity: 0.0043s (218 bytes of output)
time to execute inventory: 0.0088s (2070 bytes of output)
time to execute metric: 0.0132s (640 bytes of output)
time to execute number: 0.0074s (788 bytes of output)
time to execute oddtemplate: 0.0071s (173 bytes of output)
time to execute priority: 0.0083s (587 bytes of output)
time to execute products: 0.0085s (439 bytes of output)
time to execute queens: 0.0900s (1772 bytes of output)
time to execute tower: 0.1555s (70729 bytes of output)
time to execute trend: 0.0513s (8382 bytes of output)
time to execute union: 0.0058s (128 bytes of output)
time to execute xpath: 0.0062s (225 bytes of output)
time to execute xslbench1: 0.0204s (7011 bytes of output)

Cheers,
Brian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: benchmark.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20011217/822e0d47/attachment.ksh>


More information about the Python-list mailing list