JIT compilers for Python, what is the latest news?

Chris Angelico rosuav at gmail.com
Fri Apr 5 04:27:40 EDT 2013


On Fri, Apr 5, 2013 at 1:29 PM, John Ladasky <john_ladasky at sbcglobal.net> wrote:
> I'm revisiting a project that I haven't touched in over a year.  It was written in Python 2.6, and executed on 32-bit Ubuntu 10.10.  I experienced a 20% performance increase when I used Psyco, because I had a computationally-intensive routine which occupied most of my CPU cycles, and always received the same data type.  (Multiprocessing also helped, and I was using that too.)
>
> I guess I can live with the 20% slower execution, but sometimes my code would run for three solid days...

Two things to try, in order:

1) Can you optimize your algorithms? Three days of processing is... a LOT.

2) Rewrite some key portions in C, possibly using Cython (as MRAB suggested).

You may well find that you don't actually need to make any
language-level changes. If there's some critical mathematical function
that already exists in C, making use of it might make all the
difference you need.

ChrisA



More information about the Python-list mailing list