The discussion on this topic seems to have died down. However, I had a look at the patch and here are some comments:<br><br>This has the potential to speed up simple strings expressions like<br>s = '1' + '2' + '3' + '4' + '5' + '6' + '7' + '8'
<br><br>However, if this is followed by<br>s += '9' this (the 9th string) will cause rendering of the existing value of s and then create another concatenated string. This can, however, be changed, but I have not checked to see if it is worth it.
<br><br>The deallocation code needs to be robust for a complex tree - it is currently not recursive, but needs to be, like the concatenation code.<br><br>Construct like s = a + b + c + d + e , where a, b etc. have been assigned string values earlier will not benefit from the patch.
<br><br>If the values are generated and concatenated in a single expression, that is another type of construct that will benefit.<br><br>There are some other changes needed that I can write up if needed.<br><br>-Chetan<br>
<br><div><span class="gmail_quote">On 10/13/06, <b class="gmail_sendername"><a href="mailto:python-dev-request@python.org">python-dev-request@python.org</a></b> &lt;<a href="mailto:python-dev-request@python.org">python-dev-request@python.org
</a>&gt; wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Date: Fri, 13 Oct 2006 12:02:06 -0700<br>From: Josiah Carlson &lt;
<a href="mailto:jcarlson@uci.edu">jcarlson@uci.edu</a>&gt;<br>Subject: Re: [Python-Dev] PATCH submitted: Speed up + for&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; string<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;concatenation, now as fast as &quot;&quot;.join(x) idiom<br>To: Larry Hastings &lt;
<a href="mailto:larry@hastings.org">larry@hastings.org</a>&gt;, <a href="mailto:python-dev@python.org">python-dev@python.org</a><br>Message-ID: &lt;<a href="mailto:20061013115748.09F2.JCARLSON@uci.edu">20061013115748.09F2.JCARLSON@uci.edu
</a>&gt;<br>Content-Type: text/plain; charset=&quot;US-ASCII&quot;<br><br><br>Larry Hastings &lt;<a href="mailto:larry@hastings.org">larry@hastings.org</a>&gt; wrote:<br>[snip]<br>&gt; The machine is dual-core, and was quiescent at the time.&nbsp;&nbsp;XP's scheduler
<br>&gt; is hopefully good enough to just leave the process running on one core.<br><br>It's not.&nbsp;&nbsp;Go into the task manager (accessable via Ctrl+Alt+Del by<br>default) and change the process' affinity to the second core.&nbsp;&nbsp;In my
<br>experience, running on the second core (in both 2k and XP) tends to<br>produce slightly faster results.&nbsp;&nbsp;Linux tends to keep processes on a<br>single core for a few seconds at a time.<br><br> - Josiah<br></blockquote>
</div><br>