[issue30340] Optimize out non-capturing groups
Serhiy Storchaka
report at bugs.python.org
Thu May 11 05:34:15 EDT 2017
Serhiy Storchaka added the comment:
$ ./python -m timeit -s "import re; p = re.compile(r'[a-z]|[0-9]'); s = ' '*10000+'x'" "p.search(s)"
Unpatched: 500 loops, best of 5: 732 usec per loop
Patched: 1000 loops, best of 5: 279 usec per loop
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30340>
_______________________________________
More information about the Python-bugs-list
mailing list