From owner-freebsd-hackers Thu Aug 19 11:16:17 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 3A0D9151D5 for ; Thu, 19 Aug 1999 11:16:00 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.2/8.9.2) id LAA94818; Thu, 19 Aug 1999 11:10:13 -0700 (PDT) From: Archie Cobbs Message-Id: <199908191810.LAA94818@bubba.whistle.com> Subject: Re: anybody love qsort.c? In-Reply-To: from Narvi at "Aug 19, 1999 06:16:38 pm" To: narvi@haldjas.folklore.ee (Narvi) Date: Thu, 19 Aug 1999 11:10:13 -0700 (PDT) Cc: seiwald@perforce.com (Christopher Seiwald), freebsd-hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Narvi writes: > Doesn't the qsort just switch to isort *if* the partition to sort is short > enough? That's exactly Christopher's point. It should do this but it doesn't. The code is complex but from a quick glance it appears that the decision to switch to insertion sort does not depend on the total array length. -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message