If the data you are processing is very large, and you want more than 3 highest values (eg 32 highest) then the most efficent solution is probably to use a binary heap of size 10. In the binary heap, you can delete the lowest value and add a new value together very fast. This is however not quite fast to implement, so most probably it just wont worth.
In reply to Re: Sorting values of nested hash refs
by ambrus
in thread Sorting values of nested hash refs
by doran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |