Improved pivot choosing in quicksort.