Quickest way to build a long string?

Dale Strickland-Clark dale at out-think.NOSPAMco.uk
Thu Oct 12 09:09:50 EDT 2000


Max Møller Rasmussen <maxm at normik.dk> wrote:

>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


Time! mainly. But I will if I don't get an authoritive response.


Dale Strickland-Clark
Out-Think Ltd
Business Technology Consultants





More information about the Python-list mailing list