Message36413
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:04:51 | admin | link | issue416953 messages |
2007-08-23 15:04:51 | admin | create | |
|