[NumPy-Tickets] [NumPy] #2102: numpy.abs is ~5x slower on complex64 than on complex128 under 32-bit Vista

NumPy Trac numpy-tickets@scipy....
Wed Apr 11 05:01:51 CDT 2012


#2102: numpy.abs is ~5x slower on complex64 than on complex128 under 32-bit Vista
------------------------+---------------------------------------------------
 Reporter:  hgomersall  |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  1.6.1      
 Keywords:              |  
------------------------+---------------------------------------------------
 I experience the following on my Windows Vista 32-bit machine (note the
 significant slowdown when doing abs() on the complex64 array):


 {{{
 In [95]: a = numpy.random.randn(256,2048) +
 1j*numpy.random.randn(256,2048)

 In [96]: b = numpy.complex64(a)

 In [97]: timeit numpy.abs(a)  # for comparison
 10 loops, best of 3: 30 ms per loop

 In [98]: timeit numpy.abs(b)  # (slow slow slow)
 1 loops, best of 3: 153 ms per loop

 In [99]: timeit numpy.sqrt(a*numpy.conj(a))
 10 loops, best of 3: 61.9 ms per loop

 In [100]: timeit numpy.sqrt(b*numpy.conj(b))
 10 loops, best of 3: 27.2 ms per loop
 }}}

 The final 2 lines suggest the problem is in abs() itself.

 This bug is consistent and reliable. It is not present on my 64-bit Ubuntu
 installation.

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


More information about the NumPy-Tickets mailing list