[issue1943] improved allocation of PyUnicode objects

Marc-Andre Lemburg report at bugs.python.org
Thu Mar 20 12:00:14 CET 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

Yes, all those objections apply to the string type as well. The fact
that strings are variable length objects makes it impossible to do apply
any of the possible optimizations I mentioned. If strings were a fixed
length object, it would have been possible to write a true basestring
object from which both 8-bit strings and Unicode subclass, making a lot
of things easier.

BTW: Please also see ticket #2321 to see how the change affects your
benchmarks.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1943>
__________________________________


More information about the Python-bugs-list mailing list