Speed of string += string

Aahz aahz at pythoncraft.com
Tue Apr 15 22:47:09 EDT 2003


In article <iz86drbfq4va$.1r0k6kjvji1h5.dlg at 40tude.net>,
Mads Orbesen Troest  <mads at troest.NEVERMORE.dk> wrote:
>On Sun, 13 Apr 2003 01:05:11 GMT, Carl Banks wrote:
>>
>> Constant.
>> Constant.
>> Constant.
>
>But is that /guaranteed/ (as it is with STL), or does it just happen to
>be that way with the current implementation (however unlikely it is to
>change)?

Both, sort of.  Python uses dicts internally; you can rely on any
changes to achieve roughly equivalent or better performance guarantees.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz, c.l.py, 2/4/2002




More information about the Python-list mailing list