No subject
Sun Nov 12 08:01:13 CET 2006
to join already, joining them directly is a bit faster; but
if I have to append them as they come, then cStringIO is a
bit faster -- nothing much to it one way or another, but may
perhaps be meaningful in a hot-spot of a program. The array
solution, as coded above, is clearly out of the fray (but
might be interesting if you had some estimation of total
size and could size the result array directly, rather than
have to use += -- I'll leave that to you).
Having a way to measure means you can try directly on the
platforms and python versions that matter to you. Such timing
issues may often change between releases and/or platforms,
after all!
Alex
More information about the Python-list
mailing list