Quickest way to build a long string?
Max Møller Rasmussen
maxm at normik.dk
Thu Oct 12 08:40:19 EDT 2000
From: Dale Strickland-Clark [mailto:dale at out-think.NOSPAMco.uk]
>String operations of this type tend to be memory thrashers so I was
>wondering if anyone had conducted any tests to see which of the
>approaches available might be the most efficient.
>1. multiple string concetenation. (html = html + cell)
>2. build list of components then use join at the end to make a string
>3. something even cleverer
In my expeerience the join of list(2) is by far the fastest, but why don't
you just make a simple test?
Regards
Max M
More information about the Python-list
mailing list