Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://487964]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2017-08-20 15:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (316 votes). Check out past polls.

    Notices?