[Numpy-discussion] argsort speed

Eelco Hoogendoorn hoogendoorn.eelco at gmail.com
Sun Feb 16 17:50:04 EST 2014


My guess;

First of all, you are actually manipulating twice as much data as opposed to 
an inplace sort.

Moreover, an inplace sort gains locality as it is being sorted, whereas the 
argsort is continuously making completely random memory accesses.


-----Original Message----- 
From: josef.pktd at gmail.com
Sent: Sunday, February 16, 2014 11:43 PM
To: Discussion of Numerical Python
Subject: [Numpy-discussion] argsort speed

currently using numpy 1.6.1

What's the fastest argsort for a 1d array with around 28 Million
elements, roughly uniformly distributed, random order?

Is there a reason that np.argsort is almost 3 times slower than np.sort?

I'm doing semi-systematic timing for a stats(models) algorithm.

Josef
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion 




More information about the NumPy-Discussion mailing list