import timeit
setup="""
from _ppeg import Pattern

text = open('kjv10.txt').read()

pat = Pattern.Dummy()
pat.dump()
"""

t = timeit.Timer(stmt='print pat(text)', setup=setup)
N=5
print "Time taken: %.2f sec" % (t.timeit(N)/float(N))


import timeit
setup="""
from _ppeg import Pattern

text = open('kjv10.txt').read()

pat = Pattern()
pat.setdummy()
pat.dump()
"""

t = timeit.Timer(stmt='print pat.match(text)', setup=setup)
N=5
print "Time taken: %.2f sec" % (t.timeit(N)/float(N))


--- 
+++ 
@@ -4,12 +4,11 @@
 
 text = open('kjv10.txt').read()
 
-pat = Pattern()
-pat.setdummy()
+pat = Pattern.Dummy()
 pat.dump()
 """
 
-t = timeit.Timer(stmt='print pat.match(text)', setup=setup)
+t = timeit.Timer(stmt='print pat(text)', setup=setup)
 N=5
 print "Time taken: %.2f sec" % (t.timeit(N)/float(N))
 
Update timing test to new pattern API
