From: Dan Stromberg on

I recently updated my "highest" program to optionally use a heap or
treap, giving it a nice additional performance boost.

http://stromberg.dnsalias.org/~dstromberg/highest/

It's a pretty common operation in shell scripts and *ix
administration, so it seemed worth optimizing a bit beyond the
traditional "sort -r | tail", especially now that filesystems now will
often hold millions of files; as filesystems continue to grow, this
optimization will likely gain in value (though GNU sort is pretty good
if you throw enough physmem at it).

I hope someone else finds it useful too.