How about just keeping the first 10 elements, and whenever you find a new element, just keeping the 10 highest scoring elements? That way you have never more than 11 elements in memory.
In reply to Re: Limit the size of a hash
by Corion
in thread Limit the size of a hash
by Dr Manhattan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |