Re: [Python-Dev] PATCH submitted: Speed up + for string Re: PATCHsubmitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-18 Thread Larry Hastings
Chetan Pandya wrote: > The deallocation code needs to be robust for a complex tree - it is > currently not recursive, but needs to be, like the concatenation code. It is already both those things. Deallocation is definitely recursive. See Objects/stringobject.c, function (*ahem*) recursive_deal

Re: [Python-Dev] PATCH submitted: Speed up + for string Re: PATCHsubmitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-18 Thread Scott Dial
Chetan Pandya wrote: > My statement wasn't clear enough. > > Rendering occurs if the string being concatenated is already a > concatenation object created by an earlier assignment. > I'm not sure how you came to that conclusion. My reading of the patch doesn't suggest that at all. The operatio

Re: [Python-Dev] PATCH submitted: Speed up + for string Re: PATCHsubmitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-18 Thread Chetan Pandya
My statement wasn't clear enough.Rendering occurs if the string being concatenated is already a concatenation object created by an earlier assignment. In s = a + b + c + d + e + f , there would be rendering of the source string if it is already a concatenation. Here is an example that would make it

Re: [Python-Dev] PATCH submitted: Speed up + for string Re: PATCHsubmitted: Speed up + for string concatenation, now as fast as "".join(x) idiom

2006-10-18 Thread Kristján V . Jónsson
Doesn't it end up in a call to PyString_Concat()?  That should return a PyStringConcatenationObject too, right? K Construct like s = a + b + c + d + e , where a, b etc. have been assigned string values earlier will not benefit from the patch. __