On Sat, 20 May 2017 15:27:06 -0600, "Todd C. Miller" wrote: > One optimization implemented in the sample code from "Engineering > a Sort Function" that our qsort lacks is storing the partition value > out of line when convenient. Currently, we swap the partition value > into a[0], but this can significantly degrade performance when the > array is sorted in reverse or near-reverse order. > > Since we don't want to allocate memory to store the value, only do > this when the elements of the array are int or long sized (which > is often the case). This speeds up the qsort regress test a bit, > which is probably due to the tests on reverse sorted input.
Ignore this diff for now, it can cause a crash in clang when the optimizer is used. - todd