Data structures · Heaps and priority queues
Python's heapq module does the sifting for you on an ordinary list, and a heap of a few items can watch a stream of millions.