The program doesn't stop at any of regexpes. It finishes computations sucessfully, but sometimes it takes quite short, and sometimes it takes very long.
For example on 2Mb of data, when I call "list_extr" like this:
list_extr(\( "(" . $big_string . ")" ));
it takes only half a second. But if I call like this:
my $ttt = "(" . $big_string . ")";
list_extr(\$ttt);
it takes 20 seconds (slower 40x times). Why? Both ways look the same -- make string with parentheses around old string, take reference to it, do same computations. So if they are the same why the difference in time? I think perl is doing some magic here, but only someone more expierenced would tell.
|