Message294436
> 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.) |
|
Date |
User |
Action |
Args |
2017-05-25 06:10:26 | njs | set | recipients:
+ njs, jcea, ncoghlan, benjamin.peterson, Arfrever, cvrebert, meador.inge, daniel.urban, Mark.Shannon, eric.snow, yselivanov, Jim Fasarakis-Hilliard |
2017-05-25 06:10:26 | njs | set | messageid: <1495692626.21.0.953822158477.issue12857@psf.upfronthosting.co.za> |
2017-05-25 06:10:26 | njs | link | issue12857 messages |
2017-05-25 06:10:26 | njs | create | |
|