[Python-ideas] Add specialized bytecode with guards to functions
Victor Stinner
victor.stinner at gmail.com
Wed Oct 21 18:50:47 CEST 2015
2015-10-21 18:20 GMT+02:00 Guido van Rossum <guido at python.org>:
> I haven't tried the prototype yet, but I wonder if this mightn't be a
> useful addition to an existing optimizing Python system, e.g. PyPy or (plug
> :-) Pyston?
I'm not sure that specialized functions with guards would benefit to
JIT compilers.
A best match is with Cython, pythran and other projects generating a
specialized version of a function (in native code), maybe releasing
the GIL. It would be cool to be able to use a specialized version
under some conditions. For example, if parameters are all floats, use
the specialized version optimized by Cython, other fallback to the
(slow) regular bytecode. The challenge is to automate everything and
make it easy to use.
I don't know if Numba would match with this design.
Victor
More information about the Python-ideas
mailing list