[wxPython-users] Re: Draw method in PlotCanvas class for a number
of points (>80,000) takes too much time
Christopher Barker
Chris.Barker at noaa.gov
Wed Dec 13 12:02:59 PST 2006
jmf wrote:
> You know, finding a bottleneck and improving speed can be quite
> a complicate task.
It sure can. Add that I mostly use Linux, and X-windows is asynchronous
-- it's really a trick!
> If I attempt to compare the speed
> of my modules with numpy, one get sometimes good suprises.
>
> Inverting 1000 times a 3x3 matrix with my module: 0.48 second
> Inverting 1000 times a 3x3 matrix with numpy: 0.46 second
Actually, I'm surprised that the python code isn't faster -- I bet psyco
certainly would be. There is some overhead with numpy arrays, so they
only help if you are working with large arrays. Try inverting a
1000X1000 matrix 3 times, and see what you get.
> I will not attempt to generalize, depending on the test operations the
> difference between "pure Python" modules and numpy vary broadly. Sometimes
> "pure Python" wins, sometimes numpy wins.
yup, but I like numpy syntax better anyway.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list