[SciPy-user] Performance Python with Weave article updated

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Sep 22 13:41:09 EDT 2004


Hi Francesc,

>>>>> "FA" == Francesc Alted <falted at pytables.org> writes:

    FA> Hi Prabhu, Very interesting comparison indeed.

Thanks.

    FA> By the way, I've managed to create a Pyrex version of your
    FA> small benchmark that is a little simpler than yours (it does
    FA> not need to expose the Numeric array structure) and that works
    FA> for both Numeric and numarray. The times taken by this version
    FA> are very similar to your version (for both numarray and
    FA> Numeric).

Cool!  

What I am really interested in, is to see if there is a way to
manipulate the arrays in a more elegant fashion.  All this pointer
arithmetic is fine, but ultimately you'd like something that is easy
to write.  I can't find anything simpler than the slower inline code.
I'm sure, that with some effort one can build an extension class
around the numeric array inside Pyrex to expose the array as a nice 2D
Numeric-ish array so the array computations can be more elegant.

It might then be a good idea to abstract that interface into a simple
Pyrex library that folks can use to write simple, elegant code to
write their high-performance routines with.

    FA> I'm attaching the code at the end of this message.

Thanks!  Do you want me to include this and/or your subsequent version
in the laplace.tar.gz as src/pyx_lap1.pyx with a note about it in the
README?

cheers,
prabhu




More information about the SciPy-User mailing list