[Numpy-discussion] Array vectorization in numpy
Sturla Molden
sturla at molden.no
Wed Jul 20 03:16:40 EDT 2011
Den 20.07.2011 08:49, skrev Carlos Becker:
>
> The main difference is that Matlab is able to take into account a
> pre-allocated array/matrix, probably avoiding the creation of a
> temporary and writing the results directly in the pre-allocated array.
>
> I think this is essential to speed up numpy.
As for speed, I think those who need Fortran, C or Cython knows where to
find it.
Yes, in certain situations you can make Matlab run faster than NumPy and
vice versa. But I want to see an example of a real problem where it
really matters -- not just "my faulty loop was a few milliseconds faster
in Matlab."
NumPy could use a more intelligent memory management and reuse some
storage space, but I am not sure how much difference it would make.
Sturla
More information about the NumPy-Discussion
mailing list