[Python-Dev] pymalloc and overallocation (unicodeobject.c,2.139,2.140 checkin) (original) (raw)
Martin v. Loewis martin@v.loewis.de
27 Apr 2002 00:14:34 +0200
- Previous message: [Python-Dev] pymalloc and overallocation (unicodeobject.c,2.139,2.140 checkin)
- Next message: [Python-Dev] pymalloc and overallocation (unicodeobject.c,2.139,2.140 checkin)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido van Rossum <guido@python.org> writes:
Would it make sense to change the Unicode object to use pymalloc, and to change the UTF-8 codec to count the bytes if the shortest possible output would fit in a pymalloc block? (I guess this means that the length of the Unicode string should be less than SMALLREQUESTTHRESHOLD - currently 256.)
Given my measurements, that would make sense. I suspect that counting small strings is quite efficient, so that the overhead of iterating over the string twice hides in the noise of additional invocations.
Regards, Martin
- Previous message: [Python-Dev] pymalloc and overallocation (unicodeobject.c,2.139,2.140 checkin)
- Next message: [Python-Dev] pymalloc and overallocation (unicodeobject.c,2.139,2.140 checkin)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]