Message200755
Here is a patch which speed up compiling of regular expressions with big charsets.
Microbenchmark:
$ ./python -m timeit "from sre_compile import compile; r = '[%s]' % ''.join(map(chr, range(256, 2**16, 255)))" "compile(r, 0)"
Unpatched (but with fixed issue19327): 119 msec per loop
Patched: 59.6 msec per loop
Compiling regular expressions with big charset was main cause of slowing down importing the email.message module (issue11454). |
|
Date |
User |
Action |
Args |
2013-10-21 12:01:18 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, vstinner, ezio.melotti, mrabarnett |
2013-10-21 12:01:18 | serhiy.storchaka | set | messageid: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za> |
2013-10-21 12:01:18 | serhiy.storchaka | link | issue19329 messages |
2013-10-21 12:01:18 | serhiy.storchaka | create | |
|