[Numpy-discussion] Plain array performance

Magnus Lie Hetland magnus at hetland.org
Mon Feb 10 13:03:05 CST 2003

Tim Hochberg <tim.hochberg at ieee.org>:

In my continued quest, I found this:


It sums up (in Italian, though) the great memory advantage of arrays.
(Might be a good idea to be explicit about this in the docs,
perhaps... Hm.)

> The reason I'm using arrays in psymeric are twofold. One is memory 
> usage.


> The other reason is that Psyco likes arrays 
> (http://arigo.tunes.org/psyco-preview/psycoguide/node26.html).

I sort of thought that might be a reason... :)

> In fact it was this note " The speed of a complex algorithm using an
> array as buffer (like manipulating an image pixel-by-pixel) should
> be very high; closer to C than plain Python." that led me to start
> playing around with psymeric.

I see.

> Just for grins I disabled psyco and reran some tests on psymeric. 
> Instead of comporable speed to NumPy, the speed drops to about 25x 
> slower.


> I actually would have expected it to be worse, but the drop off is
> still pretty steep.


Hm... If only we could have Psyco for non-x86 platforms... Oh, well. I
guess we will, some day. :)

> -tim

Magnus Lie Hetland               "Nothing shocks me. I'm a scientist." 
http://hetland.org                                   -- Indiana Jones

More information about the Numpy-discussion mailing list