achristiansen suggested falling back on stable sort if we do too many passes. ggaren suggested insertion sort. There's also the possibility that we could make merge sort a lot faster, if we didn't use system malloc as the temp buffer allocator.