[XML-SIG] SAX 2.0 names
Fred L. Drake, Jr.
Tue, 29 Feb 2000 11:31:35 -0500 (EST)
Lars Marius Garshol writes:
> Hmmm. That might be the way to go. I still wonder about the speed,
If the C extension is actually available, it should be about the
same a building a tuple; perhaps a *little* faster, but the difference
would come out in the wash.
> Hmmm. Let's chew on this a little more and hear some more opinions
> before deciding.
Agreed; I won't have time to write a bunch of new C code for a
couple of weeks anyway.
> I did the benchmark I spoke of, and the results indicate that the
> performance differences are very small between strings and tuples.
> Also, how you put together the strings influences the speed a
> bit. Benchmark run with Python 1.5.2 on Debian GNU/Linux on a Pentium
> II with plenty of RAM and MHz.
Looks good! As for string construction, "%s %s" % (uri, localpart)
requires 1 malloc() more for the new string than just creating the
tuple, and uri + " " + localpart would require the same number of
malloc() calls, but slightly more data copying when uri isn't "".
Very close, but both require the extra malloc() compared to just using
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives