JIT compilers for Python, what is the latest news?

Stefan Behnel stefan_ml at behnel.de
Sat Apr 6 15:41:18 EDT 2013


Joshua Landau, 06.04.2013 12:27:
> On 5 April 2013 03:29, John Ladasky 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 have now migrated to a 64-bit Ubuntu 12.10.1, and Python 3.3.  I would
>> rather not revert to my older configuration.  That being said, it would
>> appear from my initial reading that 1) Psyco is considered obsolete and is
>> no longer maintained, 2) Psyco is being superseded by PyPy, 3) PyPy doesn't
>> support Python 3.x, or 64-bit optimizations.
>>
>> Do I understand all that correctly?
>>
>> I guess I can live with the 20% slower execution, but sometimes my code
>> would run for three solid days...
> 
> If you're not willing to go far, I've heard really, really good things
> about Numba. I've not used it, but seriously:
> http://jakevdp.github.io/blog/2012/08/24/numba-vs-cython/.
> 
> Also, PyPy is fine for 64 bit, even if it doesn't gain much from it. So
> going back to 2.7 might give you that 20% back for almost free. It depends
> how complex the code is, though.

I would guess that the main problem is rather that PyPy doesn't support
NumPy (it has its own array implementation, but that's about it). John
already mentioned that most of the heavy lifting in his code is done by NumPy.

Stefan





More information about the Python-list mailing list