Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Clear questions and runnable code
get the best and fastest answer
 
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 exploiting the Monastery: (7)
As of 2014-04-16 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (436 votes), past polls