Perl Monk, Perl Meditation | |
PerlMonks |
Re: How can I improve the efficiency of this very intensive code?by sk (Curate) |
on Aug 06, 2005 at 21:23 UTC ( [id://481552]=note: print w/replies, xml ) | Need Help?? |
I feel the use of Hash might not be required for your task. You have recordID which can act as an index to an array so why put them in a hash and mess up the order? You get linear access in array using index anyways an no overhead of the hash-table That said, i would do a Matrix(nxn) (square not a requirement, dimensions might change based on num of records of course) to keep track of scores. Consider the following table
Sorting to finx max/min is an overkill. I might be missing your porblem so please correct me if i am wrong. cheers SK
In Section
Seekers of Perl Wisdom
|
|