Approaching acceptable performance
Wednesday, August 31st, 2005 I finally did the timings of _sre on pypy-c, the C translated PyPy:
Pure literals: re.search(r’bar’, ‘bazbarfoo’)
100 passes took 1.067957, 0.010680 per pass
Classes and stuff: re.search(r’\d+.\d+\s\w{,2}’, ‘Price 144,50 USD’)
100 passes took 1.278839, 0.012788 per pass
Branching and grouping: re.search(r’<(strong|b|em)>.+?’, ‘Bla <em>bla</em>’)
100 passes took 1.369234, 0.013692 per pass
I am pleasantly surprised, this is only around 1000 times slower […]