[Python-Dev] New regex module for 3.2?

Jeffrey Yasskin jyasskin at gmail.com
Fri Jul 9 17:59:43 CEST 2010


On Fri, Jul 9, 2010 at 7:06 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> On Thu, Jul 8, 2010 at 10:52 PM, MRAB <python at 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/

While the re2 comparison might be interesting from an abstract
standpoint, it intentionally supports a different regex language from
Python so that it can run faster and use less memory. Since re2 can
never replace Python's re module, it doesn't make sense to hold MRAB's
new module to that standard.


More information about the Python-Dev mailing list