[Python-Dev] Speeding up regular expression compilation
Barry Warsaw
barry at python.org
Thu Oct 30 16:03:00 EST 2003
More information about the Python-Dev mailing list
Thu Oct 30 16:03:00 EST 2003
- Previous message: [Python-Dev] Speeding up regular expression compilation
- Next message: [Python-Dev] Speeding up regular expression compilation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 2003-10-30 at 14:40, Skip Montanaro wrote: > 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. Of course you can just assign your compiled regular expression objects to a global or local and use that. Instant caching! Which is what I tend to do. -Barry
- Previous message: [Python-Dev] Speeding up regular expression compilation
- Next message: [Python-Dev] Speeding up regular expression compilation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list