in reply to Re^3: Hypothesis: some magic string optimalization in perl kills my server from time to time
in thread Hypothesis: some magic string optimalization in perl kills my server from time to time
# ./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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Hypothesis: some magic string optimalization in perl kills my server from time to time
by dave_the_m (Monsignor) on Oct 01, 2016 at 10:56 UTC | |
by BrowserUk (Patriarch) on Oct 01, 2016 at 13:00 UTC | |
by leszekdubiel (Scribe) on Oct 02, 2016 at 10:59 UTC | |
by leszekdubiel (Scribe) on Oct 02, 2016 at 21:38 UTC |