[XML-SIG] Developer's Day position paper

Paul Prescod paul@prescod.net
Fri, 21 Jan 2000 03:37:34 -0800


Andrew Kuchling wrote:
> 
> [amk@mira bench]$ python pyexp.py
> PyExpat w/ null handlers: 279663 bytes in 0.04 seconds = 6575.70 K/sec
> PyExpat w/ StartElementHandler: 279663 bytes in 0.19 seconds = 1457.33
> K/sec
> PyExpat w/ Start,End: 279663 bytes in 0.25 seconds = 1102.61 K/sec
> PyExpat w/ Start,End,Char,PI: 279663 bytes in 0.36 seconds = 758.03
> K/sec
> Fast xmllib: 279663 bytes in 3.15 seconds = 86.66 K/sec
> Slow xmllib: 279663 bytes in 17.77 seconds = 15.37 K/sec
> Raw sgmlop: 279663 bytes in 0.02 seconds = 11004.42 K/sec
> [amk@mira bench]$
> 
> Assuming no errors in the benchmark, xmllib on top of PyExpat should
> be around half as fast as xmllib on top of sgmlop, probably roughly
> 40K/sec on my machine.  (That's just a guess, though.)  Like
> economists, this benchmark probably points in several directions. :)

I don't see where you get that figure. Actual parsing takes up a small
fraction of xmllib's time. If you reduce that to zero you still don't
speed up the entire process much. If you double it, you don't slow down
the entire process much. If you double the 0.02 seconds (parsing time)
in the 3.15 (xmllib processing time) you change the time to 3.17 seconds
-- an increase of just 0.6%. (but its late...I may be missing something)

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for himself
Earth will soon support only survivor species -- dandelions, roaches, 
lizards, thistles, crows, rats. Not to mention 10 billion humans.
	- Planet of the Weeds, Harper's Magazine, October 1998