[Numpy-discussion] String sort

Francesc Altet faltet@carabos....
Wed Feb 13 04:34:46 CST 2008


A Tuesday 12 February 2008, Charles R Harris escrigué:
> On Feb 12, 2008 9:07 AM, Francesc Altet <faltet@carabos.com> wrote:
> > * The newqsort performs the best on all the platforms we have
> > checked (ranging from a 5% of improvement on Opteron/SuSe, up to
> > 3.8x with some Pentium4/Ubuntu systems).
>
> The 3.8 is amazing, isn't it? I've found that the performance also
> depends on whether I initialize the strings with random or empty.
> With the random initialization the new sort is ~2x faster. That's
> fedora 8, core duo, 32 bit OS, gcc 4.1.2.

Well, for me, a 3.8x (or even a 2x for that matter) of improvement is 
less amazing once you know that there is a flaw in C qsort for most of 
Linux distros around.  Neither Windows, MacOSX or certain versions of 
Linux (namely, SuSe 10.3) does reflect such a large difference in 
performance.

I'd say that newqsort that is to be included in next release of NumPy 
would be just a 10% better than using a sane implementation of C qsort.  
And, while a 10% is not as amazing than a 380%, the great news is that 
newqsort will provide first-class performance even to people having the 
flawed C qsort on their machines (which apparently are much more that I 
initially realized).

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"


More information about the Numpy-discussion mailing list