New implementation of re module
Piet van Oostrum
piet at cs.uu.nl
Thu Jul 30 09:39:35 EDT 2009
>>>>> MRAB <python at mrabarnett.plus.com> (M) wrote:
>M> Hi all,
>M> I've been working on a new implementation of the re module. The details
>M> are at http://bugs.python.org/issue2636, specifically from
>M> http://bugs.python.org/issue2636#msg90954. I've included a .pyd file for
>M> Python 2.6 on Windows if you want to try it out.
>M> I'm interested in how fast it is generally, compared with the current re
>M> module, but especially when faced with those 'pathological' regular
>M> expressions which seem to take a long time to finish, for example:
>M> re.search(r"^(.+|D)*A$", "x" * 25 + "B")
>M> which on my PC (1.8GHz) takes 18.98secs with the re module but <0.01secs
>M> with this new implementation.
Is this version also going to use the Thompson approach?
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list