Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: sorting a list of hashes on an element/attribute of the hash

by salva (Canon)
on Jun 04, 2007 at 17:43 UTC ( #619188=note: print w/replies, xml ) Need Help??


in reply to Re: sorting a list of hashes on an element/attribute of the hash
in thread sorting a list of hashes on an element/attribute of the hash

Well, I am currently working on Sort::Key::Radix that uses a Radix Sort as the sorting algorithm and has identical usage to Sort::Key.

When sorting large data sets and for some kinds of data, as for instance small numbers (as shown on the OP), it can be much faster than Sort::Key.

use Sort::Key::Radix qw(ukeysort); my @by_order = ukeysort { $_->{order} } @data;

...though I am still getting some FAIL reports from the CPAN testers.

  • Comment on Re^2: sorting a list of hashes on an element/attribute of the hash
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://619188]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2021-04-20 21:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?