Wow. Just, Wow. The time spent performing the WEED task went from almost 500 seconds down to 33 seconds. Fantastic!

<b>Urodele 17:47:27</b> ~/Desktop> perl -w weedtest Benchmark: timing 100000 iterations of mybinary, singlepass, useagrep. +.. mybinary: 1 wallclock secs ( 0.58 usr + 0.01 sys = 0.59 CPU) @ 16 +9491.53/s (n=100000) singlepass: 1 wallclock secs ( 0.58 usr + 0.00 sys = 0.58 CPU) @ 17 +2413.79/s (n=100000) useagrep: 270 wallclock secs (266.95 usr + 0.63 sys = 267.58 CPU) @ + 373.72/s (n=100000) Rate useagrep mybinary singlepass useagrep 374/s -- -100% -100% mybinary 169492/s 45253% -- -2% singlepass 172414/s 46034% 2% -- <b>Urodele 17:51:59</b> ~/Desktop> dprofpp Total Elapsed Time = 361.1940 Seconds User+System Time = 306.4840 Seconds Exclusive Times %Time ExclSec CumulS #Calls sec/call Csec/c Name 80.7 247.5 247.52 22012 0.0112 0.0112 main::SEARCHFASTA 7.78 23.84 23.849 127206 0.0000 0.0000 main::BANDPASS 4.45 13.64 13.649 164 0.0832 0.0832 main::GET_TEXT 3.07 9.399 33.248 1 9.3990 33.248 main::WEED 2.30 7.060 7.060 1 7.0600 7.0600 main::INDEX_FASTA 0.82 2.519 2.519 164 0.0154 0.0154 main::ADD_SPAN 0.60 1.829 4.398 1 1.8292 4.3983 main::HTML_FORMAT 0.36 1.110 1.110 1 1.1100 1.1100 main::WEEDNUM 0.20 0.610 308.51 2 0.3049 154.25 main::MAIN 0.12 0.380 0.380 1 0.3800 0.3800 main::OVERLAP 0.11 0.340 0.340 1 0.3400 0.3400 main::CLUSTER 0.05 0.140 0.140 2 0.0700 0.0700 main::GET_ENDS 0.02 0.050 0.050 1 0.0500 0.0500 main::TABLE_IT 0.01 0.030 0.410 1 0.0300 0.4100 main::SORT_HITS 0.01 0.020 0.020 2 0.0100 0.0100 main::WEED_HEADERS <b>Urodele 17:54:51</b> ~/Desktop>

Just as a reminder, the dprof output of my original program was:

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 2.10 16.20 16.209 164 0.0988 0.0988 main::GET_TEXT 0.71 5.460 5.460 1 5.4600 5.4600 main::INDEX_FASTA 0.40 3.089 3.089 164 0.0188 0.0188 main::ADD_SPAN 0.15 1.140 1.140 1 1.1400 1.1400 main::WEEDNUM 0.08 0.599 770.48 2 0.2994 385.24 main::MAIN 0.05 0.380 0.380 1 0.3800 0.3800 main::OVERLAP 0.05 0.350 0.350 1 0.3500 0.3500 main::CLUSTER 0.02 0.130 0.130 2 0.0650 0.0650 main::GET_ENDS 0.01 0.048 3.176 1 0.0482 3.1764 main::HTML_FORMAT 0.01 0.040 0.040 1 0.0400 0.0400 main::TABLE_IT 0.01 0.040 0.420 1 0.0400 0.4200 main::SORT_HITS 0.00 0.020 0.020 2 0.0100 0.0100 main::WEED_HEADERS 0.00 0.010 0.010 1 0.0100 0.0100 warnings::BEGIN

Thanks!!!


In reply to Re^4: Help tightening up a subroutine please (Updated) by mdunnbass
in thread Help tightening up a subroutine please by mdunnbass

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.