Nick Coghlan <ncogh...@gmail.com> added the comment:

Starting to make some progress on an implementation, and it occurs to me that 
if this approach does work out, it should make Python level trace functions 
*much* faster.

Right now, the call to the Python function in call_trampoline is bracketed by 
PyFrame_FastToLocals() and PyFrame_LocalsToFast(), even if the trace function 
never accesses frame.f_locals.

By contrast, with the proposed design, PyFrame_LocalsToFast() never gets called 
anywhere (I've actually replaced the entire body with a PyErr_SetString call), 
and PyFrame_FastTo_Locals will only be called in the frame.f_locals descriptor 
implementation.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30744>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to