[SciPy-dev] Sorting speed
oliphant.travis at ieee.org
Fri Dec 30 13:21:24 CST 2005
Francesc Altet wrote:
>It seems that scipy_core (0.9.0.1713) is far more slower than numarray
>(1.5.0) when sorting arrays:
>In : t5=timeit.Timer('a=sc.empty(shape=10000);a.sort()', 'import
>scipy.base as sc')
>In : t5.repeat(3,100)
>Out: [0.40603208541870117, 0.41605615615844727, 0.39800286293029785]
>In : t4=timeit.Timer('a=na.array(None, shape=10000);a.sort()', 'import
>numarray as na')
>In : t4.repeat(3,100)
>Out: [0.090479135513305664, 0.086208105087280273, 0.086167097091674805]
>i.e. numarray is roughly 5x faster than scipy_core.
There are many sorting algorithms in numarray. I'm not sure which one
is being used regularly, but I'd like to see them brought over, though,
which shouldn't be too big of a deal and is on the radar.
Another opportunity for someone to get their hands dirty....
More information about the Scipy-dev