Stefan Behnel <sco...@users.sourceforge.net> added the comment: >> As long as there is a way to access these fields directly from the >> struct (with the usual preprocessor conditional), I don't think Cython >> will actually start to use the PyErr_[GS]etExcInfo() functions in >> CPython - simply for performance reasons. > > Isn't this premature optimization? Do you have any workload where you > measured a performance degradation?
To be honest - I don't know if it makes a measurable difference. However, the code is there, it's required for all currently released CPython versions (i.e. those still being supported for years to come), and it is used in seriously performance critical places, such as each generator/coroutine iteration - twice. Why should we add overhead to those without need? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13897> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com