in reply to Re: Sorting Hash By Large Number Values
in thread Sorting Hash By Large Number Values

davido,
Sorting so as to grab the top N elements is only efficient if you need the list to be sorted anyway.

If you haven't seen it, you might want to take a look at Better mousetrap (getting top N values from list X). I am not sure your statement is always true though in general it is good advice.

Cheers - L~R

  • Comment on Re^2: Sorting Hash By Large Number Values