[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Python and Speed



Are you familiar with the handful of ways to optimize parts of your code?

Swig is the classic one I think, it wraps some C source into a python module.

Pyrex does a similar thing, but it lets you wrap it yourself with a
python-esque language; it lets you use python types and C types within
the same pyrex file, so you have control over when things get
converted between them.

Cython is Pyrex plus more features, but they're less conservative than
python as far stability (I think). Though their opinion is that pyrex
is too conservative. Check it out.

I think Boost somehow does it too, you'll have to look that up.

I've never really used any of these other than to test it out though.

On Wed, Apr 16, 2008 at 8:36 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> Recently, I've been having issues in all fortes of my programming experience
> where Python is no longer fast enough to fill the need adaquately.  I really
> love Python and its syntax (or lack of), and all the nice modules (such as
> PyGame) made for it.  Are there any plans to improve Python's speed to at
> least the level of C languages?  I feel like Python is living down to its
> namesake's pace...
>  Ian
>