From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11927 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Wrong info in libc comparison Date: Wed, 13 Sep 2017 21:25:29 +0200 Message-ID: <20170913192528.GA15263@port70.net> References: <20170913135154.pfwpg7f32nv4dhja@voyager> <20170913181010.GS1627@brightrain.aerifal.cx> <20170913185106.ddbgztckagdojcdd@voyager> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1505330751 21552 195.159.176.226 (13 Sep 2017 19:25:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 13 Sep 2017 19:25:51 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-11940-gllmg-musl=m.gmane.org@lists.openwall.com Wed Sep 13 21:25:47 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dsDIB-0005W9-MS for gllmg-musl@m.gmane.org; Wed, 13 Sep 2017 21:25:47 +0200 Original-Received: (qmail 17470 invoked by uid 550); 13 Sep 2017 19:25:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 17424 invoked from network); 13 Sep 2017 19:25:40 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20170913185106.ddbgztckagdojcdd@voyager> Xref: news.gmane.org gmane.linux.lib.musl.general:11927 Archived-At: * Markus Wichmann [2017-09-13 20:51:06 +0200]: > On Wed, Sep 13, 2017 at 02:10:10PM -0400, Rich Felker wrote: > > I'm not sure we agree on what introsort means -- normally I take it to > > mean doing an O(n=B2) algorithm with good "typical case" performance to > > begin with, but switching to an O(log n) algorithm with a worse > > constant factor as soon as it detects a risk that time will grow > > quadratically. Normally this is something like starting with quicksort > > and possibly switching to heapsort, and my understanding at the time > > was that glibc was doing that or something similar, and AFAIK it still > > is in the general case where there's insufficient memory for a merge > > sort. Does that sound incorrect? > >=20 > > Rich >=20 > At least the version I was looking at (2.19) doesn't do that at all. As > I said, even in case of failed malloc(), all it does is a quicksort. > With an insertion sort afterwards, but that's not introsort by either of > our definitions. And in any case, malloc() failure is rare these days, i think malloc failure case is the one that matters for worst case analysis so the comparision table should say whatever quicksort is doing.