Tue, 19 Jul 2011 11:05:18 +0200, Carlos Becker wrote:
> Hi, I started with numpy a few days ago. I was timing some array
> operations and found that numpy takes 3 or 4 times longer than Matlab on
> a simple array-minus-scalar operation.
> This looks as if there is a lack of vectorization, even though this is
> just a guess. I hope this is not reposting. I tried searching the
> mailing list database but did not find anything related specifically to
> a problem like this one.

I see essentially no performance difference:

Matlab [7.10.0.499 (R2010a)]: 0.0321
Numpy [1.6.0]: 0.03117567

If later versions of Matlab can parallelize the computation across
multiple processors, that could be one possibility for the difference
you see. Alternatively, you may have compiled Numpy with optimizations
turned off.

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

Reply via email to