improving python performance by extension module (64bit)

Stephen Hansen me+list/python at ixokai.io
Fri Jun 25 11:34:12 EDT 2010


On Thu, Jun 24, 2010 at 7:52 PM, Peng Yu <pengyu.ut at gmail.com> wrote:

> http://psyco.sourceforge.net/
>
> The above package can improve python program on 32 bit library. But I
> need to run on 64 bit library. Is there any other module that can help
> improving the performance of python on 64 bit?
>

This is a total aside as a response, and I mean no offense by it :) But are
you sure you're ready to go there? Your questions have been pretty basic so
far, and to go from basic to needing 64-bit performance boosts is a bit
jarring. Have you profiled your code and located some bottlenecks where
you've determined you need this?

Python's slow, sure. But its in practice fast enough for an extremely broad
range of activities. In my own personal, entirely anecdotal experience:
those places where its not, I've actually often found Python wrappers for
libraries that are. The lxml module for instance in some places where I do
some crazy-intense xml processing. By using mature, established and fast
libraries written in C(++) and wrapped in Python, I get all the benefits of
their speed boosts, and don't have to even bother re-inventing the wheel
myself and getting all the pesky details right.

Now, true. Sometimes there isn't a square wheel already invented and you may
find that place where Python's dynamic fluffy love is hiptastic and so its
tripping over itself, at which point as others have noted-- Cython's what
you're looking for.

In my personal experience, that situation is actually really rare, though.
Demonstrate you need it before you go out of your way to avoid it -- it'll
save you time in the future, I think :)

--S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100625/ec598520/attachment.html>


More information about the Python-list mailing list