Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Everyone was so helpful the other day in regards to my thread regarding performance revisions, I thought I would ask another.
I have the following code, and I'm curious if it can be made more efficient.
These are consuming the most time according to -d:SmallProfBLOCK 1 sub CONVERT { # record->[1] is the key for the hash of arrays foreach my $record (@Data) { $record->[1] =~ s/\s+//g; $record->[1] = join ("_", $Map{$record->[1]}[1], $Map{$record->[1] +}[0]); } } BLOCK 2 foreach my $record (@Data ) { for my $i (0 .. 4) { print DATA $record->[$i] . " "; } print DATA "\n"; }
Thanks again for the help
2006-03-28 Retitled by planetscape, as per Monastery guidelines
Original title: 'performance'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: advice on improving performance of this code
by gjb (Vicar) on Jan 03, 2003 at 21:43 UTC | |
by tachyon (Chancellor) on Jan 03, 2003 at 23:09 UTC | |
by The_Rev (Acolyte) on Jan 04, 2003 at 02:14 UTC | |
|
Re: advice on improving performance of this code
by jdporter (Paladin) on Jan 03, 2003 at 21:35 UTC | |
|
Re: advice on improving performance of this code
by webengr (Pilgrim) on Jan 03, 2003 at 22:17 UTC | |
by diotalevi (Canon) on Jan 03, 2003 at 22:50 UTC |