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

Re: Re: [pygame] Python and Speed



Ian Mallett <geometrian@xxxxxxxxx> wrote:
> ... if C++ can do it, Python should be able to too.  Obviously, I don't know 
> how Python is structured ...

Then please learn more about CPython's internals and the general problem of optimising a dynamic language like Python. The CPython code is incredibly well-written and easy to understand, even with the various complications that exist due to current optimisations* and there's plenty of academic research into dynamic languages out there. I'm sure the core devs would welcome your patches with open arms!


I'll leave you with Greg's wisdom, which perhaps needs repeating:

> > If wishing could make it so, Python would already be blazingly fast!


     Richard

* for example the double dict-lookup implementations that seamlessly replace the string-only lookup with an arbitrary-object lookup on the first non-string lookup, or the function-call frame caching mechanism that I had a hand in implementing...