[Python-3000] characters data type

Josiah Carlson jcarlson at uci.edu
Sat May 6 11:41:33 CEST 2006


"Guido van Rossum" <guido at python.org> wrote:
> 
> On 5/4/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> >
> > "Guido van Rossum" <guido at python.org> wrote:
> > > Can you please post the benchmarking code?
> >
> > No problem.
> 
> OK, so I have the advantage of a time machine... Or at least the p3yk
> (sic) branch. I created a perhaps more reasonable benchmark; you can
> see it in SVN here:

I like your benchmark better, and it's good to find out that bytes.join
is fast (also good to know that bytes/str.join have been shown to be
faster than += in more realistic tests).

There is, of course, the other rub that if one mixes += operations with
other operations (like let's say reading that actual data from a socket
or from a generated buffer, etc.), there is the potential for memory
fragmentation.  Probably not a big deal for everyone, but I've been bit
by it.


 - Josiah



More information about the Python-3000 mailing list