Here is the file -- 200 kilobytes (... small one):

download from Poland

download from we transfer

There is minimal test and description. Below is how I run tests. See -- one is half a seconds, and other is 20 seconds.

# ./show_me_the_problem.sh **************************** here are the two programs: -rwxr-xr-x 1 root root 177 wrz 30 17:57 run_fast.pl -rwxr-xr-x 1 root root 190 wrz 30 17:57 run_slow.pl **************************** the difference is: 10c10,11 < my $lst = list_extr(\( "(" . $inp . ")" )); --- > my $par = "(" . $inp . ")"; > my $lst = list_extr(\$par); **************************** data is the same... let's run them... time ./run_fast.pl | wc -l 9506 real 0m0.476s user 0m0.456s sys 0m0.016s **************************** time ./run_slow.pl | wc -l 9506 real 0m22.591s user 0m22.556s sys 0m0.012s **************************** seee... programs are almost the same... but their time is totally dife +erent


In reply to Re^4: Hypothesis: some magic string optimalization in perl kills my server from time to time by leszekdubiel
in thread Hypothesis: some magic string optimalization in perl kills my server from time to time by leszekdubiel

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.