svn commit: r200184 - stable/8/sbin/ipfw
Brooks Davis
brooks at FreeBSD.org
Mon Dec 7 21:06:42 UTC 2009
On Mon, Dec 07, 2009 at 02:17:44PM -0600, Brooks Davis wrote:
> On Sun, Dec 06, 2009 at 07:01:33PM +0000, Luigi Rizzo wrote:
> > Author: luigi
> > Date: Sun Dec 6 19:01:33 2009
> > New Revision: 200184
> > URL: http://svn.freebsd.org/changeset/base/200184
> >
> > Log:
> > mfc r200056
> > use qsort_r instead of heapsort;
>
> This seems like a move in the wrong direction. The use of a recursive
> algorithm in the kernel seems generally ill-advised and I was rather
> disturbed when I found we had a quick sort implementation in libkern.
>
> Unless you know the number of items is small, quick sort isn't safe and
> if the number is small, heap sort is plenty efficient.
Woops, it was pointed out to me that this was the userspace part where
qsort is just fine. :)
-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-8/attachments/20091207/a3e80427/attachment.pgp
More information about the svn-src-stable-8
mailing list