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 serhiy.storchaka
Recipients ezio.melotti, mrabarnett, serhiy.storchaka, vstinner
Date 2013-10-21.12:01:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2013-10-21 12:01:18serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, ezio.melotti, mrabarnett
2013-10-21 12:01:18serhiy.storchakasetmessageid: <1382356878.81.0.973141365685.issue19329@psf.upfronthosting.co.za>
2013-10-21 12:01:18serhiy.storchakalinkissue19329 messages
2013-10-21 12:01:18serhiy.storchakacreate