|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
Re: Pattern matching across two files, Need something better than grep -f!by kennethk (Monsignor) |
| on Apr 10, 2012 at 18:26 UTC ( #964384=note: print w/ replies, xml ) | Need Help?? |
|
So anytime you want to "minimise the runtime... code to as small as possible", you need to study the code to determine where you are spending your time. This means profiling and benchmarking. I would recommend you check out Devel::NYTProf and Benchmark. A couple things you are doing, which you could address, some of which would likely improve performance and others would are good coding practice, include:
Implementing all this might result in something like (untested):
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||