|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Slow Regex - How to Optimizeby rnahi (Curate) |
| on Aug 30, 2005 at 17:56 UTC ( [id://487962]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
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
|
|
||||||||||||||||||||||||||||||