[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #29461: "Experiment usage of likely/unlikely in CPython core". -- ___ Python tracker ___ __

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The next question might it: would it be worth it to try using unlikely() > macro on (kwargs == NULL) test in the macro? ;-) Perhaps this may help in some critical tight loops (in implementations of dict, string operations or long integer arithmetic), but I

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset f5ef851ff6b26529382747cfea4674158c7c1ebc by Serhiy Storchaka in branch 'master': Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and https://github.com/python/cpython/commit/f5ef851ff6b26529382747cfea4674158c7c1ebc -- ___

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: Oh right, I recall that I proposed it. Thanks for this change :-) The next question might it: would it be worth it to try using unlikely() macro on (kwargs == NULL) test in the macro? ;-) I'm talking about GCC/Clang __builtin_expect: #define unlikely(x) _

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 82d1c8d15e18 by Serhiy Storchaka in branch 'default': Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and https://hg.python.org/cpython/rev/82d1c8d15e18 -- nosy: +python-dev ___ Python tracker

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue29460] Speed up _PyArg_NoKeywords() and like

2017-02-06 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and _PyArg_NoPositional() macros. This eliminates the overhead of the cross-module function call in common case. This idea was previously discussed in issue26822 and raised again in issue29