Re: [PHP4BETA] (Fwd) Re: [PHP4BETA] cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c basic_functions.h
| From: | Andrei Zmievski | Date: | Fri, 08 Oct 1999 15:28:47 +0000 |
| Subject: | Re: [PHP4BETA] (Fwd) Re: [PHP4BETA] cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c basic_functions.h | ||
| References: | 1 2 3 4 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5405@lists.php.net to get a copy of this message | ||
Sascha Schumann wrote:
> On Fri, Oct 08, 1999 at 10:11:32AM -0500, Andrei Zmievski wrote:
> >
> > This happens because Solaris uses proper qsort(), whereas Linux's qsort()
is
> > really a mergesort.
>
> Did you try shuffle on Linux with larger arrays?
>
>
> 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving
> insertion sort to order the MAX_THRESH items within each partition.
> This is a big win, since insertion sort is faster for small, mostly
> sorted array segments.
>
>
http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/libc/stdlib/qsort.c?rev=1.8&co
ntent-type=text/x-cvsweb-markup&cvsroot=glibc
Hmm, I guess I looked at glibc's qsort().
-Andrei
Any sufficiently advanced Operating System
is indistinguishable from Linux
- Jim Dennis