From: horst DOT kraemer AT gmx DOT de (Horst Kraemer) Newsgroups: comp.os.msdos.djgpp Subject: Re: qsort's algorithm Date: Mon, 23 Oct 2000 01:13:12 GMT Lines: 19 Message-ID: <39f35c64.3093928@news.cis.dfn.de> References: NNTP-Posting-Host: a0f6e.pppool.de (213.6.15.110) X-Trace: fu-berlin.de 972263549 22565037 213.6.15.110 (16 [27606]) X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 18 Oct 2000 03:02:12 GMT, Damian Yerrick wrote: > From what I understand of the C standard, qsort() can use any decent > sorting algorithm. Does DJGPP libc's qsort() have bad performance on > already sorted data? According to the C standard an implementation may choose *any* algorithm. DJGPP's qsort doesn't perform worse with already (almost) sorted data. According to my experience it has a big performance problem if the number of keys to be sorted is small w.r.t. to the number of items. Try to sort a big integer array containing only 0 and 1 entries. Regards Horst