On Fri, Jul 9, 2010 at 10:28 AM, MRAB <pyt...@mrabarnett.plus.com> wrote: > anatoly techtonik wrote: >> >> On Thu, Jul 8, 2010 at 10:52 PM, MRAB <pyt...@mrabarnett.plus.com> wrote: >>> >>> Hi all, >>> >>> I re-implemented the re module, adding new features and speed >>> improvements. It's available at: >>> >>> http://pypi.python.org/pypi/regex >>> >>> under the name "regex" so that it can be tried alongside "re". >>> >>> I'd be interested in any comments or feedback. How does it compare with >>> "re" in terms of speed on real-world data? The benchmarks suggest it >>> should be faster, or at worst comparable. >> >> And where are the benchmarks? >> In particular it would be interesting to see it compared both to re >> from stdlib and re2 from http://code.google.com/p/re2/ >> > The benchmarks bm_regex_effbot.py and bm_regex_v8.py both perform > multiple runs of the tests multiple times, giving just the total times > for each set. Here are the averages: > > Python26 > BENCHMARK re regex ratio > bm_regex_effbot 0.135secs 0.083secs 1.63 > bm_regex_v8 0.153secs 0.085secs 1.80 > > > Python31 > BENCHMARK re regex ratio > bm_regex_effbot 0.138secs 0.083secs 1.66 > bm_regex_v8 0.170secs 0.091secs 1.87
Out of curiosity, what are the results for the bm_regex_compile benchmark? Collin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com