[Tutor] Astonishing timing result

Kent Johnson kent37 at tds.net
Thu Jun 26 14:57:57 CEST 2008


On Thu, Jun 26, 2008 at 3:18 AM, Dick Moores <rdm at rcblue.com> wrote:

> I thought I'd use this to compare the 2 ways of string concatenation. Ever
> since I began to learn Python I've been told that only one of these is the
> proper and efficient one to use, and especially so if the string to be
> stitched together is a very long one.

String concatenation was optimized in Python 2.4. You might like to
try this test in Python 2.3. See the last note here:
http://www.python.org/doc/2.4.4/whatsnew/node12.html#SECTION0001210000000000000000

Kent


More information about the Tutor mailing list