[Numpy-discussion] Performance of defmatrix.py:103(__array_finalize__)
Travis Oliphant
oliphant at ee.byu.edu
Wed Jul 19 16:25:41 CDT 2006
Kevin Jacobs <jacobs at bioinformed.com> wrote:
> On 7/19/06, *Travis Oliphant* <oliphant.travis at ieee.org
> <mailto:oliphant.travis at ieee.org>> wrote:
>
> Kevin Jacobs <jacobs at bioinformed.com
> <mailto:jacobs at bioinformed.com>> wrote:
> > On 7/19/06, *Kevin Jacobs <jacobs at bioinformed.com
> <mailto:jacobs at bioinformed.com>
> > <mailto: jacobs at bioinformed.com
> <mailto:jacobs at bioinformed.com>>>* <bioinformed at gmail.com
> <mailto:bioinformed at gmail.com>
> > <mailto:bioinformed at gmail.com <mailto:bioinformed at gmail.com>>>
> wrote:
> >
> > Is it expected that the following script would spend over
> half of
> > the total execution time in
> defmatrix.py:103(__array_finalize__)?
> >
> >
> > Confirmed that a similar overhead exists for arrays, though not as
> > extreme. My application requires the ability to assign random
> > elements, so any speed ups here will result be quite significant.
> >
> There is an optimization for this kind of assignment in current NumPy
> SVN which "should" avoid the array creation over-head.
>
>
>
> There still seems to be a huge performance penalty with using a matrix
> to set elements. Consider this code where X is initially a matrix:
Are you now using SVN NumPy, or are we still looking at NumPy 0.9.8 numbers?
-Travis
More information about the Numpy-discussion
mailing list