This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients Arfrever, Jim Fasarakis-Hilliard, Mark.Shannon, benjamin.peterson, cvrebert, daniel.urban, eric.snow, jcea, meador.inge, ncoghlan, njs, yselivanov
Date 2017-05-25.06:10:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1495692626.21.0.953822158477.issue12857@psf.upfronthosting.co.za>
In-reply-to
Content
> Yes, whenever you touch frames you're disabling the JIT for the call site (and maybe for more call sites up the stack, idk).  So it doesn't matter what you use, `f_func` or `f_locals`, the performance will suffer big time.  Is that acceptable for Trio?

Ah, but that's the trick: with f_func the only time I have to touch frames is from my SIGINT handler, and its fine if *that* drops us out of the JIT (it probably has to in any case). The rest of the time, the interpreter would be automatically tracking all the state I need, so it's effectively free, and PyPy can do all its normal magic. The problem with using locals() / f_locals for this is that I have to constantly touch them during normal execution.

(Probably we shouldn't make a huge deal out of the PyPy case though – for me the main advantages of f_func are the simplicity and atomicity. But FWIW I also just pinged Armin on #pypy and he said that PyPy wouldn't have a problem supporting f_func.)
History
Date User Action Args
2017-05-25 06:10:26njssetrecipients: + njs, jcea, ncoghlan, benjamin.peterson, Arfrever, cvrebert, meador.inge, daniel.urban, Mark.Shannon, eric.snow, yselivanov, Jim Fasarakis-Hilliard
2017-05-25 06:10:26njssetmessageid: <1495692626.21.0.953822158477.issue12857@psf.upfronthosting.co.za>
2017-05-25 06:10:26njslinkissue12857 messages
2017-05-25 06:10:26njscreate