racket/collects/tests/mzscheme/benchmarks/rx/python_prefix.py
2006-09-14 00:35:39 +00:00

11 lines
202 B
Python

import re
import time
def test(rx, input, iterations):
crx = re.compile(rx)
start = time.time()
for i in range(0, iterations):
re.search(crx, input)
print(time.time() - start)