[Numpy-discussion] Plain array performance

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


Tim Hochberg <tim.hochberg at ieee.org>:
>
[snip]

In my continued quest, I found this:

  http://www.penguin.it/pipermail/python/2002-October/001917.html

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.

Right.

> 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.

Yikes!

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

Indeed...

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