in reply to advice on improving performance of this code
Hi again ;-)
In the first block I'd replace
with$record->[1] = join ("_", $Map{$record->[1]}[1], $Map{$record->[1]}[0] +);
$record->[1] = $Map{$record->[1]}[1] . '_' . $Map{$record->[1]}[1];
In the second block I'd avoid the iteration by using join:
rather thanprint DATA join(" ", @$record[0..4]), "\n";
or evenfor my $i (0 .. 4) { print DATA $record->[$i] . " "; } print DATA "\n";
that does the whole block in one line.print DATA join(" ", @$_[0..4]), "\n" for (@Data);
You can find the code I used to do the benchmarks on my scrachpad.
Hope this helps, -gjb-
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: advice on improving performance of this code
by tachyon (Chancellor) on Jan 03, 2003 at 23:09 UTC | |
|
Re: Re: advice on improving performance of this code
by The_Rev (Acolyte) on Jan 04, 2003 at 02:14 UTC |