Hi Eleytherios, On Wed, Nov 7, 2012 at 6:25 PM, Eleytherios Stamatogiannakis <estama@gmail.com> wrote:
- From what i understand, right now when a python function is called through a callback, the JIT compiler does not notice it, so it doesn't JIT the function at all. So is it possible to specify that some python function should always be JITted?
No, It works better than that, but still not as well as it could. Right now, the Python function used as a callback will be JITted; but the problem is that it will only be JITted at the point of entering the Python function. What goes on before and after the actual call to the Python function is not JITted. So for example if your callback is of type "int callback(int)", then when called, it will go via libffi's callback mechanism (1st indirection), wrap the int argument in a W_IntObject (2nd indirection), and only then call the Python function (which will invoke JITted code).
- Is CFFI going to be integrated inside pypy?
Yes. Right now only the "_cffi_backend" module is part of a recent "pypy" binary. We will also include the pure Python part of CFFI inside the next PyPy release, 2.0.
- Will CFFI support JITted callbacks?
The situation described above will probably not be improved in time for the upcoming "2.0 beta", but some time later. A bientôt, Armin.