[pypy-dev] Saving and reloading JIT optimizations

David Fraser davidf at sjsoft.com
Fri Aug 19 15:50:02 CEST 2011



On Friday, August 19, 2011 at 3:40:24 PM, "Harald Armin Massa" <chef at ghum.de> wrote:
> >> The pypy JIT takes a while to work out which parts of python code
> >> need optimization etc,
>
> > No, this is not really doable.  The JIT writes explicitly in the
> > assembler the address of a ton of constants.
>
> could a special "logging area" be of use? as in
>
> JIT decides foo_do_something_often() is worthy to be compiled into assembler
> -> this decision gets added to the logging area
>
> on next startup the JIT can read the logging area, for which functions
> compiling is a good idea?

That sounds interesting. But a lot of the JIT advantage seems to be cross-function, which might be more complicated right?
If something like this were to be done perhaps rather than being done on function names it could be done by hashing the compiled bytecode it's executing...

David


More information about the pypy-dev mailing list