Serhiy Storchaka added the comment: Here is a patch which reverts 3.1 implementation (and adds some optimization).
Microbenchmark: $ ./python -m timeit -s "import re" "re._compile('', 0)" Results: 3.1: 1.45 usec per loop 3.2: 4.45 usec per loop 3.3: 9.91 usec per loop 3.4patched: 0.89 usec per loop ---------- keywords: +patch Added file: http://bugs.python.org/file27877/re_compile_cache.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16389> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com