Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 2016 14:06:25 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Hans Petter Selasky <hps@selasky.org>, Ryan Stone <rysto32@gmail.com>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r294327 - in head/sys: dev/cxgb dev/cxgbe dev/e1000 dev/hyperv/netvsc dev/ixgbe dev/mxge netinet sys
Message-ID:  <56BCDBB1.9000202@FreeBSD.org>
In-Reply-To: <CANCZdfpmYMGKJkX4uQR6Uet18cffJ4-uXxRSxfbe3Q6p2Pb48Q@mail.gmail.com>
References:  <201601191533.u0JFXSxf037804@repo.freebsd.org> <CAFMmRNz3uXim3H3-sGuBUBs45Jy8p260ywothgp4iFkUcnvnEw@mail.gmail.com> <56BAE4BC.9000105@selasky.org> <56BB5280.5060609@FreeBSD.org> <CANCZdfpmYMGKJkX4uQR6Uet18cffJ4-uXxRSxfbe3Q6p2Pb48Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 02/11/16 11:47, Warner Losh wrote:
>
>
> On Wed, Feb 10, 2016 at 8:08 AM, Pedro Giffuni <pfg@freebsd.org
...

>
>
>     FWIW, our libc qsort() has an additional enhancement:
>
>     http://svnweb.freebsd.org/base?view=revision&revision=279663
>
>     In my measurements qsort(3) was now always faster than mergesort(3).
>
>
> If it is faster, is there any good reason to maintain both qsort and
> mergesort in the kernel then?
>

I don't know, that happened ages ago, way before I was around ;).

The late enhancement is only in the libc qsort and the code is likely to 
be different in other ways (is it recursive? .. haven't looked).

I think I saw some comments somewhere about degenerate cases that
affect our version of qsort, but the performance is known to be
very good[1].

Pedro.

[1] http://calmerthanyouare.org/2013/05/31/qsort-shootout.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56BCDBB1.9000202>