Re: Sorted Hash
- From: "A. Sinan Unur" <1usa@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Nov 2007 13:23:02 GMT
Salvador Fandino <sfandino@xxxxxxxxx> wrote in news:fiorj9$gto$1
@hefestos.uned.es:
palexvs@xxxxxxxxx wrote:
I filled hash and then printed it (sorted by key):
my %hs = (
key10 => 5,
key5 => b,
aey9 => 7,
)
foreach my $k (sort keys %hs) { print "$k $hs{$k}\n"; }
key - string ([0-9A-F]{72}), 50K records.
How do it more effective?
yu can use the radix sort implementation available from
Sort::Key::Radix
that is usually faster for this kind of data that the merge sort used
internally by perl:
Does sorting speed matter when most of the time is spent printing?
Sinan
--
A. Sinan Unur <1usa@xxxxxxxxxxxxxxxxxxx>
(remove .invalid and reverse each component for email address)
clpmisc guidelines: <URL:http://www.augustmail.com/~tadmc/clpmisc.shtml>
.
- Follow-Ups:
- Re: Sorted Hash
- From: Damian Lukowski
- Re: Sorted Hash
- References:
- Sorted Hash
- From: palexvs@xxxxxxxxx
- Re: Sorted Hash
- From: Salvador Fandino
- Sorted Hash
- Prev by Date: Re: Sorted Hash
- Next by Date: Re: Sorted Hash
- Previous by thread: Re: Sorted Hash
- Next by thread: Re: Sorted Hash
- Index(es):