A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039841.html below:

[Python-Dev] Speeding up regular expression compilation

[Python-Dev] Speeding up regular expression compilation [Python-Dev] Speeding up regular expression compilationSkip Montanaro skip at pobox.com
Thu Oct 30 14:40:54 EST 2003
(better on python-list at python.org than here, btw)

    Bram> Is there a trick to make compiling patterns go faster?

Not really.  Note though that the sre module caches compiled regular
expressions.  How many it caches depends on the size of sre._MAXCACHE
(default is 100).  If you have many more regular expressions than that,
you'll spend a lot of time compiling them.  You might find it helpful to
boost that number.

If you're adventurous, you might investigate recasting the
sre_compile._compile function as C code.  If you use an Intel CPU, another
alternative might be to use psyco.

Skip


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4