[SciPy-dev] timing comparison

Travis Oliphant oliphant at ee.byu.edu
Thu Dec 8 17:06:42 CST 2005


Eric Firing wrote:

> Travis,
>
> Attached are profile outputs from the mpl contour_demo script, after I 
> made the changes from min to amin etc in ma.py.  The overall times are 
> similar, but there is a factor of two difference in total time spent 
> in calls to the array function.

The array function is more complicated now so that may be unavoidable.  
If the sizes of arrays being created are small, then the increased 
overhead may have an impact.    The array-creation code was taken from 
Numeric.   One thing that can speed things up is to specify a type 
rather than have the code try to determine one.   I suspect that trying 
to determine a type from an object can be slower in scipy then in 
Numeric (there are more cases to check), so this might be most of the 
slow-down.   Just a hunch...

If mpl relys on ma.py, then it is possible that ma.py is slower as 
well.   For large arrays the extra overhead that exists should not 
matter, but for small arrays it might
Thanks for the profiles,

-Travis







More information about the Scipy-dev mailing list