Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 14:17:44 -0600
From:      Brooks Davis <brooks@freebsd.org>
To:        Luigi Rizzo <luigi@freebsd.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   Re: svn commit: r200184 - stable/8/sbin/ipfw
Message-ID:  <20091207201744.GA77256@lor.one-eyed-alien.net>
In-Reply-To: <200912061901.nB6J1X7L028816@svn.freebsd.org>
References:  <200912061901.nB6J1X7L028816@svn.freebsd.org>

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

--fUYQa+Pmc3FrFX/N
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> 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.

-- Brooks

--fUYQa+Pmc3FrFX/N
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iD8DBQFLHWLoXY6L6fI4GtQRArluAJ9dOCmyxtl1sioZn6e4akpWFqD1wwCgrnc9
OUdu3HYsdlTRtnocrHF6/y8=
=VNea
-----END PGP SIGNATURE-----

--fUYQa+Pmc3FrFX/N--



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