This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients
Date 2001-04-18.05:37:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
In code that supports both byte and unicode strings,
mixing unicode strings with plain character constants
is frequent. E.g. both sre_compile and xmlproc look for
specific characters in an input string. Every usage of
such a character requires default decoding, which will
create a temporary Unicode object.

This patch caches Unicode objects that represent ASCII
characters. On the benchmark

import time
u = u""
t=time.time()
for i in xrange(1000000):
    u+"("
print time.time()-t

it shows a 10% speed-up.
History
Date User Action Args
2007-08-23 15:04:51adminlinkissue416953 messages
2007-08-23 15:04:51admincreate