[off topic] Re: [Numpy-discussion] numarray speed - PySequence_GetItem
Chris Barker
Chris.Barker at noaa.gov
Tue Jun 29 16:28:05 CDT 2004
Todd Miller wrote:
> Yes. What I most want to do is a 50000 point drawlines, similar to what
> you profiled. Friends are fine too.
Actually, it was someone else that did the profiling, but here is a
sample, about as simple as I could make it.
It draws an N point line and M points. At the moment, it is using
Numeric for the points, and numarray for the lines. Numeric is MUCH
faster (which is the whole point of this discussion). Otherwise, it
takes about the same amount of time to draw the lines as the points.
Another note: if use the tolist() method in the numarray first, it's
much faster also:
dc.DrawLines(LinesPoints.tolist())
Obviously, the tolist method is much faster than wxPython's sequence
methods, as would be expected.
I'm going to send a note to Robin Dunn about this as well, and see what
he thinks.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: DrawLinesTest.py
Url: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20040629/0d38ff7a/attachment.pl
More information about the Numpy-discussion
mailing list