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-July/036832.html below:

[Python-Dev] 2.3 startup speed?

[Python-Dev] 2.3 startup speed?Jeremy Hylton jeremy@zope.com
11 Jul 2003 11:04:43 -0400
On Fri, 2003-07-11 at 10:55, Skip Montanaro wrote:
>     Jeremy> The two default filters use the regular expression "".  So we're
>     Jeremy> getting absolutely no benefit from those regular expressions.  I
>     Jeremy> propose to modify the two regex slots in the filter tuple to
>     Jeremy> also store None, where None means matching anything.
> 
> Why bother compiling the regular expressions ahead of time?  Just store
> strings and use re.match(...) instead of pat.match(...).  When you encounter
> a potential warning you want to suppress, I suspect it's not generally going
> to be in a speed critical part of the system.  If it is a potential
> performance issue, the re module will have the compiled regular expression
> in its cache.

I'd like to avoid importing re at all if it isn't needed.  If you write
a simple script and care about it's startup time, it would be nice if
Python didn't require you to load re just to ignore Overflow warnings.

Jeremy





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