Problems? Is your data what you think it is? | |
PerlMonks |
Re: Slow Regex - How to Optimizeby rnahi (Curate) |
on Aug 30, 2005 at 21:56 UTC ( [id://487962]=note: print w/replies, xml ) | Need Help?? |
I would use a different approach, i.e. make a single string from your @sub_code and apply the search for each key just once.
Notice that your code has a subtle bug. If the same routine is used twice in oone line, you'll get it only once. E.g.: sqrt(x) + sqrt(y) BTW, what is that $key in your code?
In Section
Seekers of Perl Wisdom
|
|