[Python-checkins] benchmarks: Fix usage of re.purge() in bm_regex_compile

zach.ware python-checkins at python.org
Wed Nov 25 00:29:05 EST 2015


https://hg.python.org/benchmarks/rev/f7283190e896
changeset:   234:f7283190e896
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Thu Nov 12 23:16:25 2015 -0600
summary:
  Fix usage of re.purge() in bm_regex_compile

files:
  performance/bm_regex_compile.py |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/performance/bm_regex_compile.py b/performance/bm_regex_compile.py
--- a/performance/bm_regex_compile.py
+++ b/performance/bm_regex_compile.py
@@ -53,14 +53,13 @@
 
 
 def test_regex_compile(count, timer):
-    re.purge()
     regexes = capture_regexes()
     times = []
 
     for _ in xrange(count):
         t0 = timer()
         for regex, flags in regexes:
-            clear_cache()
+            re.purge()
             re.compile(regex, flags)
         t1 = timer()
         times.append(t1 - t0)

-- 
Repository URL: https://hg.python.org/benchmarks


More information about the Python-checkins mailing list