]> granicus.if.org Git - python/commit
The default size of the re module's compiled regular expression cache has
authorGregory P. Smith <greg@mad-scientist.com>
Tue, 27 Jul 2010 05:31:29 +0000 (05:31 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Tue, 27 Jul 2010 05:31:29 +0000 (05:31 +0000)
commit5a63183a8b8a9e177f97feac975850df5e6f98aa
tree5cc448b4d1c43daf25f07973360871bf449c773d
parentf5ae1efd417b06cef5164cac79e2cc46afa6dd80
The default size of the re module's compiled regular expression cache has
been increased from 100 to 500 and the cache replacement policy has changed
from simply clearing the entire cache on overflow to randomly forgetting 20%
of the existing cached compiled regular expressions.  This is a performance
win for applications that use a lot of regular expressions and limits the
impact of the performance hit anytime the cache is exceeded.
Lib/re.py
Lib/test/test_re.py
Misc/NEWS