[Python-Dev] RE: [Python-checkins] python/dist/src/Objects unicodeobject.c,2.139,2.140 (original) (raw)

Martin v. Loewis martin@v.loewis.de
21 Apr 2002 23:19:18 +0200


For string storage I suspect it's better to move the memory (typically exactly one shrinking realloc, after which the string storage is immutable until death)

OTOH, for many string objects, death comes quickly, e.g. if they get concatenated to some other string. It is difficult to anticipate how long any given string will live - wasted memory appears to be best measured in bytes*seconds.

Regards, Martin