[SciPy-dev] Scipy-dev Digest, Vol 67, Issue 12
Thu May 7 13:30:59 CDT 2009
> Date: Thu, 7 May 2009 11:49:08 -0600
> From: Charles R Harris <email@example.com>
> Subject: Re: [SciPy-dev] fast sorting of most numpy array types
> To: SciPy Developers List <firstname.lastname@example.org>
> Numpy has quicksort, mergesort, and heapsort and now and then someone on
> list suggests adding radix sort. No doubt radix is suitable for certain
> types, char arrays seem a natural. But there are problems with byte order
> for the different integer types and floats can become complicated. And
> unlike quicksort radix sort isn't done inplace. So it isn't clear that a
> radix sort is the way to go for sorting in general but it could be useful
> some places.
Do you have some time results?
Hi Charles -
There are time results against glibc qsort() in the original post. The
distribution of usort also provides an optimized quicksort with inlined
comparisons and the capacity to test this against glibc. The "win" from
inlining comparions is not as great as using radix sort.
I have not timed against heap/merge sorts... since I believe these are
slower on average on randomized inputs.
By byte order were you referring to endianess of different architectures?
This could be a deal breaker as the code is written.
The usort library already consists of in-place routines.
Andrew I. Schein
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev