qsort() documentation

Ryan Stone rysto32 at gmail.com
Mon Apr 18 13:25:41 UTC 2016


On Mon, Apr 18, 2016 at 9:09 AM, Hans Petter Selasky <hps at selasky.org> wrote

> I think the algorithm is switching to mergesort. I'll look up the paper
> and add that correctly before commit.
>

No, it switches to insertion sort, assuming that it's acting on an already
sorted array.  If that assumption is wrong you still get O(n**2) complexity.


More information about the freebsd-current mailing list