Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Slow Regex - How to Optimize

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


in reply to Slow Regex - How to Optimize

Maybe using a generic regexp, then checking against %SUBS would be better? That eliminates a nested loop and multiple regexp compilations.

foreach my $line ( @sub_code ) { if ( $line =~ /(\w+)\(/ ) { if ( exists $SUBS{$1} ) { push( @subs, $1 ); } } }

Note: I assumed %SUBS keys are subroutine names, not regexps.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://487968]
help
Chatterbox?
[Corion]: Meh, first round of escalations for me not wanting to fix in production what a project has mismanaged. Now another project, which eats up all the resources until end of this year wants to take that task and put it on my list of things as well.
[Corion]: So now there will be the fun of me explaining to the project that $other_project had low priority because $project has high priority. If $project picks up the task from $other_project, they also will need to reprioritize my tasks to get that done...
[Corion]: ... of course at the cost of something else on my list of tasks for $project, as there only is a finite amount of days until $deadline.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-08-17 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (287 votes). Check out past polls.

    Notices?