From owner-svn-src-stable-8@FreeBSD.ORG Mon Dec 7 21:06:42 2009 Return-Path: Delivered-To: svn-src-stable-8@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9636D106568D; Mon, 7 Dec 2009 21:06:42 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 47C6C8FC15; Mon, 7 Dec 2009 21:06:42 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id nB7L5QHP077790; Mon, 7 Dec 2009 15:05:26 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id nB7L5QI8077789; Mon, 7 Dec 2009 15:05:26 -0600 (CST) (envelope-from brooks) Date: Mon, 7 Dec 2009 15:05:26 -0600 From: Brooks Davis To: Luigi Rizzo Message-ID: <20091207210526.GD77256@lor.one-eyed-alien.net> References: <200912061901.nB6J1X7L028816@svn.freebsd.org> <20091207201744.GA77256@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sXc4Kmr5FA7axrvy" Content-Disposition: inline In-Reply-To: <20091207201744.GA77256@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Mon, 07 Dec 2009 15:05:26 -0600 (CST) 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 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 21:06:42 -0000 --sXc4Kmr5FA7axrvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > Log: > > mfc r200056 > > use qsort_r instead of heapsort; >=20 > 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. >=20 > 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 --sXc4Kmr5FA7axrvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFLHW4VXY6L6fI4GtQRAvLYAJ9dLBrE1AdVvoR3duv4DWzwUqfexQCbBtYi fZ9IB0YuH41DdOS1D+24u+Q= =ghbb -----END PGP SIGNATURE----- --sXc4Kmr5FA7axrvy--