[NumPy-Tickets] [NumPy] #2065: Poor ndarray.take performance on Fortran order arrays

NumPy Trac numpy-tickets@scipy....
Sun Feb 26 12:27:00 CST 2012


#2065: Poor ndarray.take performance on Fortran order arrays
--------------------+-------------------------------------------------------
 Reporter:  wesm    |       Owner:  somebody   
     Type:  defect  |      Status:  new        
 Priority:  normal  |   Milestone:  Unscheduled
Component:  Other   |     Version:  1.6.1      
 Keywords:          |  
--------------------+-------------------------------------------------------
 3000x slowdown observed:

 {{{
 In [25]: arr = np.random.randn(350000, 5)

 In [26]: timeit arr.take(np.arange(5), axis=0)
 100000 loops, best of 3: 2.86 us per loop

 In [27]: arr = np.random.randn(350000, 5).copy('F')

 In [28]: timeit arr.take(np.arange(5), axis=0)
 100 loops, best of 3: 9.03 ms per loop
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2065>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list