in reply to Re^7: Refactoring a large script
in thread Refactoring a large script
You beat me to the punch on that one. I was already planning it. :D
Update: Here is the original sub's run times:
Total Elapsed Time = 1135.701 Seconds User+System Time = 770.4718 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 63.8 491.8 491.86 1 491.86 491.86 main::WEED 32.5 251.1 251.10 22012 0.0114 0.0114 main::SEARCHFASTA
And here it is without the switch to grep, but keeping the sorting fixes you suggested, as well as most of your other helps:
Total Elapsed Time = 789.7615 Seconds User+System Time = 741.4615 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 65.4 485.3 485.35 1 485.35 485.35 main::WEED 33.5 248.8 248.86 22012 0.0113 0.0113 main::SEARCHFASTA 0.96 7.120 7.120 1 7.1200 7.1200 main::INDEX_FASTA
So, removing the double sorting shaved off 6.5 seconds. It's a start.. Now, to try and shave off another 300 or so more....
Matt
|
|---|