JIT compilers for Python, what is the latest news?

Ian Kelly ian.g.kelly at gmail.com
Fri Apr 5 15:05:07 EDT 2013


On Fri, Apr 5, 2013 at 12:13 PM, John Ladasky
<john_ladasky at sbcglobal.net> wrote:
> On Friday, April 5, 2013 10:32:21 AM UTC-7, Ian wrote:
>
>> That doesn't seem to follow from your original post.  Because Numpy is
>> a C extension, its performance would not be improved by psyco at all.
>
> What about the fact that Numpy accommodates Python's dynamic typing?  You can pass arrays of integers, floats, bytes, or even PyObjects.  I don't know exactly how all that is implemented.

I don't know exactly either, but psyco JIT compiles Python, not C.  In
the PyObject case you might see some benefit if numpy ends up calling
back into methods that are implemented in Python.

> In my case, I was always passing floats.  So what I assumed that psyco was doing for me was compiling a neural network class that always expected floats.

Right, so if you take that routine and rewrite it as a C function that
expects floats and handles them internally as such, I would think that
you might see a similar improvement.



More information about the Python-list mailing list