[sf-perl] regular expression ?

yary not.com at gmail.com
Mon Sep 26 13:38:50 PDT 2011


On Mon, Sep 26, 2011 at 4:32 PM, David Alban <extasia at extasia.org> wrote:
> is there any appreciable loss (performance or otherwise) in compiling
> one's regex's even if they don't end up being used in a loop or
> frequently called subroutine?  i do it as a matter of course.
or case insensitivity.

Performance, I think is the same, but readability/maintenance may take
a hit when you introduce a variable (which you may compile explicitly)
to replace a literal regexp (which is still compiled for you). Depends
on the situation.


More information about the SanFrancisco-pm mailing list