[off topic] Re: [Numpy-discussion] numarray speed - PySequence_GetItem
Todd Miller
jmiller at stsci.edu
Tue Jun 29 09:12:48 EDT 2004
On Mon, 2004-06-28 at 19:38, Sebastian Haase wrote:
> > Is 10x a measured number or a gut feel?
>
> I put some time.clock() statements into the wxPyPlot code
> I got this: (the times are differences: T_after-T_before)
> one run with numarray:
> <__main__.PolyLine instance at 0x868d414> time= 1.06
> <__main__.PolyMarker instance at 0x878e9c4> time= 1.37
> a second run with numarray:
> <__main__.PolyLine instance at 0x875da1c> time= 0.85
> <__main__.PolyMarker instance at 0x86da034> time= 1.04
> first run with Numeric:
> <__main__.PolyLine instance at 0x858babc> time= 0.07
> <__main__.PolyMarker instance at 0x858bc4c> time= 0.14
> a second one:
> <__main__.PolyLine instance at 0x858cd7c> time= 0.08
> <__main__.PolyMarker instance at 0x8585d8c> time= 0.17
> This seems to be consistent with the profiling I did before:
> I get this w/ numarray:
> ncalls tottime percall cumtime percall filename:lineno(function)
> 1 1.140 1.140 1.320 1.320 gdi.py:554(DrawLines)
> 1 1.250 1.250 1.520 1.520 gdi.py:792(_DrawRectangleList)
> 50230 0.450 0.000 0.450 0.000 numarraycore.py:501(__del__)
> and this with Numeric:
> 1 0.080 0.080 0.080 0.080 gdi.py:554(DrawLines)
> 1 0.090 0.090 0.090 0.090 gdi.py:792(_DrawRectangleList)
>
> so this looks to me like a factor of 10x.
Me too. Can you (or somebody) post the application code which does the
drawlines? I can definitely instrument the bottleneck C-code, but I
don't have time to ascend the wxPython learning curve.
Todd
More information about the NumPy-Discussion
mailing list