Sebastian Haase wrote:
> Hi,
> can someone comment on these timing numbers ?
> http://narray.rubyforge.org/bench.html.en
>
> Is the current numpy faster ?
>   

It is hard to know without getting the same machine or having the 
benchmark sources. But except for add, all other operations rely on 
underlying blas/lapack (only matrix operations do if you have no cblas), 
so I am a bit surprised by the results.

FWIW, doing 100 x "c = a + b" with 1e6 elements on a PIV prescott @ 3.2 
Ghz is about 2 sec, and I count numpy start:

import numpy as np

a = np.random.randn(1e6)
b = np.random.randn(1e6)

for i in range(100):
    a + b

And np.dot(a, b) for 3 iterations and 500x500 takes 0.5 seconds (again 
taking into account numpy import), but what you really do here is 
benchmarking your underlying BLAS (if numpy.dot does use BLAS, again, 
which it does at least when built with ATLAS).

cheers,

David
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to