[pypy-dev] Pypy custom interpreter JIT question

Armin Rigo arigo at tunes.org
Fri Mar 25 19:18:10 CET 2011


Hi Andrew,

On Fri, Mar 25, 2011 at 5:47 PM, Andrew Brown <brownan at gmail.com> wrote:
> Thanks, it does indeed work now!

The next step is to have a look at the traces produced (run with
PYPYLOG=jit-log-opt:logfile), and spot the obvious missing
optimizations.  The biggest issue seems to be the fact that the
dictionary 'bracket_map' is green, but it is not enough to ensure that
it is a constant dict (it could be mutated behind the JIT's back); so
in the end, every trace contains reads from it.  You could fix it by
moving the line

            newpc = bracket_map[pc]

to a new function to which you apply the decorator @pypy.rlib.jit.pure_function.


A bientôt,

Armin.



More information about the Pypy-dev mailing list