[XML-SIG] speed question re DOM parsing

Juergen Hermann Juergen Hermann" <jhe@webde-ag.de
Fri, 23 Jun 2000 13:50:18 +0200


On Fri, 23 Jun 2000 04:14:11 -0700, Greg Stein wrote:

>well... not so obvious. You're appending characters. 

Well, Bjorn's original message contained the words "growing a string cha=
racter 
by character", so I assumed... :)

Given this input

n=3D100
testtext =3D ['x'*1000] * 100
testtext =3D ['x'*100] * 1000
testtext =3D ['x'*50] * 2000

I get

Length of testtext is 100
                join    2.573
           stringio2    3.969
Length of testtext is 1000
                join    5.729
           stringio2    6.043
Length of testtext is 2000
                join    9.137
           stringio2    7.823

So on my machine, the break-even is later than on yours.


Ciao, J=FCrgen

--
J=FCrgen Hermann (jhe@webde-ag.de)
WEB.DE AG, Amalienbadstr.41, D-76227 Karlsruhe
Tel.: 0721/94329-0, Fax: 0721/94329-22