Re: [PHP4BETA] (Fwd) Re: [PHP4BETA] cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c basic_functions.h
| From: | Sascha Schumann | Date: | Fri, 08 Oct 1999 15:28:10 +0000 |
| Subject: | Re: [PHP4BETA] (Fwd) Re: [PHP4BETA] cvs: /php4 ChangeLog /php4/ext/standard basic_functions.c basic_functions.h | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5404@lists.php.net to get a copy of this message | ||
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&content-type=text/x-cvsweb-markup&cvsroot=glibc
--
Regards,
Sascha Schumann
Consultant