Hi all,

i made some speed tests using the sin-function and the %-operation to compare 
Numeric, numpy 0.9.8 and numpy 0.9.9.2732. 
As result the latest numpy version seems to be very slow in comparison to the 
two other candidates.

Results (in usec per loop):
                                     sin-array            mod-array  
                                    
 Numeric                                134                   18         
  
 numpy 0.9.8                             97                   55

 numpy 0.9.9.2732                       204                  316
   
 numpy 0.9.8 + math                      38

 numpy 0.9.9.2732 + math                161
  
 Numeric + math                          23


The used scripts can be found at the end. 

Can anyone verify my results and explain the observed speed degression?

Thanks,
Steffen


sin-scripts:

/usr/lib/python2.3/timeit.py -s "from Numeric import sin,zeros,arange; 
x=zeros(10, 'd'); x[0]=0.1" "for i in arange(9): x[i+1]=sin(x[i])"
 
/usr/lib/python2.3/timeit.py -s "from numpy import sin,zeros,arange; 
x=zeros(10, 'd'); x[0]=0.1" "for i in arange(9): x[i+1]=sin(x[i])"
 
/usr/lib/python2.3/timeit.py -s "from math import sin; from numpy import 
zeros,arange; x=zeros(10, 'd');x[0]=0.1" "for i in arange(9): 
x[i+1]=sin(x[i])"

/usr/lib/python2.3/timeit.py -s "from math import sin; from Numeric import 
zeros,arange; x=zeros(10, 'd'); x[0]=0.1" "for i in arange(9): 
x[i+1]=sin(x[i]
)"


%-scripts

/usr/lib/python2.3/timeit.py -s "from Numeric import zeros,arange; x=zeros(10, 
'd'); x[0]=0.1" "for i in arange(9): x[i+1]=(x[i]+1.1)%(1.0)"
 
/usr/lib/python2.3/timeit.py -s "from numpy import zeros,arange; x=zeros(10, 
'd'); x[0]=0.1" "for i in arange(9): x[i+1]=(x[i]+1.1)%(1.0)"

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to