New submission from Serhiy Storchaka:

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).

----------
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
files: re_mk_bitmap.patch
keywords: patch
messages: 200755
nosy: ezio.melotti, haypo, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Faster compiling of big charset regexpes
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file32278/re_mk_bitmap.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19329>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to