The zip worked fine.
I cannot make much sense of the statistics either. There is something weird going on. The spliting seems to be taking an inordinate amount of time.
Part of the problem is that with all three files calling the same subroutine, all the statistics get lumped in together and averaged out, so you cannot see if there is any significant differences between the first run and the other two.
To address that, I'd create C&P copies of the X() subroutine (say x1() x2() & x3()), and call a different version for each file. That will break out the timings for each file and perhaps highlight run to run differences.
Also, from the numbers presented, it looks like end-of-loop overhead is getting lumped in with the last statement in the loop. To counter that, I'd stick a dummy statement at the bottom of the loop:
my $dummy;
sub x1{
open my $fh, '<', shift or die $!;
my @AoA;
while (my $line = <$fh>) {
my @line_arr = split ',', $line;
#push @AoA, \@line_arr;
$dummy = 1;
}
}
Next time i'll just upload the nytprof.out file.
That would certainly be easier (I assume by "upload", you mean here to PM!). Especially for anyone attempting to follow along.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|