Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Slow Regex - How to Optimize

by ikegami (Pope)
on Aug 30, 2005 at 22:05 UTC ( #487964=note: print w/ replies, xml ) Need Help??


in reply to Re: Slow Regex - How to Optimize
in thread Slow Regex - How to Optimize

That's not true. m/.../ only recompiles if the contents of any interpolated variable has changed. Demo:

use re 'debug'; foreach (qw( abc abc def )) { print("==============================\n"); print("$_\n"); print("\n"); /$_/; }

Update: Oops, I didn't notice you reversed the loops in addition to moving the regexp.


Comment on Re^2: Slow Regex - How to Optimize
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://487964]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2015-07-08 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls