[Numpy-discussion] Array vectorization in numpy

Carlos Becker carlosbecker at gmail.com
Tue Jul 19 07:40:20 EDT 2011


Hi Pauli, thanks for the quick answer.
Is there a way to check the optimization flags of numpy after  
installation?

I am away of a matlab installation now, but I remember I saw a single  
processor active with matlab. I will check it again soon

Thanks!



El 19/07/2011, a las 13:10, Pauli Virtanen <pav at iki.fi> escribió:

> 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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list