Where do your 10,000,000 key-value pairs come from? The system with the least overhead would be to determine the max N while loading them in, obtaining them from mars, etc. Since you have to go through the input once, anyway, during input, you can keep track of the top N at the same time.
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: *Fastest* way to print a hash sorted by value
by TomDLux
in thread *Fastest* way to print a hash sorted by value
by smellysocks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |