[Python-Dev] frame evaluation API PEP

Guido van Rossum guido at python.org
Mon Jun 20 18:13:15 EDT 2016

Couple uses of "it" here are ambiguous -- are you saying we don't need
co_extra after all, or that we can safely insist it's a dict, or...?

On Mon, Jun 20, 2016 at 1:20 PM, Dino Viehland via Python-Dev <
python-dev at python.org> wrote:

> Mark wrote:
> > > Dino and I thought of two potential alternatives, neither of which we
> > > have taken the time to implement and benchmark. One is to simply have
> > > a hash table of memory addresses to JIT data that is kept on the JIT
> > > side of things. Obviously it would be nice to avoid the overhead of a
> > > hash table lookup on every function call. This also doesn't help
> > > minimize memory when the code object gets GC'ed.
> >
> > Hash lookups aren't that slow. If you combine it with the custom flags
> > suggested by MRAB, then you would only suffer the lookup penalty when
> > actually entering the special interpreter.
> > You can use a weakref callback to ensure things get GC'd properly.
> >
> > Also, if there is a special extra field on code-object, then everyone
> will want
> > to use it. How do you handle clashes?
> This is exactly what I've started prototyping and have mostly coded up,
> I've
> just been getting randomized and haven't gotten back to it yet.
> It may have some impact in the short-term but my expectation is that as the
> JIT gets better that this will become less and less important.  Currently
> we're
> just JITing one method at a time and have no inlining support.  But once we
> can start putting guards in place and inlining across multiple function
> calls
> we will start reducing the transitions from JIT -> Function Call -> JIT
> and get
> rid of those hash table lookups entirely.  And if we can't succeed at
> inlining then
> I suspect the JIT won't end up offering the performance we'd hope for.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/guido%40python.org

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160620/e0a6eda5/attachment.html>

More information about the Python-Dev mailing list