[issue31835] _PyFunction_FastCallDict and _PyFunction_FastCallKeywords: fast path not used
STINNER Victor
report at bugs.python.org
Mon Oct 23 11:44:40 EDT 2017
STINNER Victor <victor.stinner at gmail.com> added the comment:
> The fix is simple. Replace the faulty sub-expression by
> (co->co_flags & (~PyCF_MASK)) == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE))
I proposed PR 4087 to implement this optimization.
I wouldn't call it a "fix", since the "co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)" check exists since Python 2.7 at least (whereas Python 2.7 also has CO_FUTURE_xxx flags).
> Just a minor performance issue.
I prefer to call it a performance opportunity :-)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31835>
_______________________________________
More information about the Python-bugs-list
mailing list