Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: You don't always have to use regexesby spurperl (Priest) |
on Feb 23, 2005 at 16:02 UTC ( [id://433731]=note: print w/replies, xml ) | Need Help?? |
It's quite interesting to time this and see just how much performance is gained. Additionally, I'm curious whether the regex engine has, or planned to have optimizations on "static" expressions like this ?
Additionally, usage of substr can save quite a few regular expressions here and there. But the rule of thumb should be: use whatever seems more natural for the problem at hand, and optimize only if necessary.
In Section
Meditations
|
|