This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2017年02月06日 08:09 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| _PyArg_NoKeywords_macro.patch | serhiy.storchaka, 2017年02月06日 08:09 | review | ||
| Messages (7) | |||
|---|---|---|---|
| msg287098 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年02月06日 08:09 | |
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 issue29452. |
|||
| msg287104 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2017年02月06日 08:32 | |
+1 |
|||
| msg287105 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2017年02月06日 08:42 | |
New changeset 82d1c8d15e18 by Serhiy Storchaka in branch 'default': Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and https://hg.python.org/cpython/rev/82d1c8d15e18 |
|||
| msg287106 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2017年02月06日 08:50 | |
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) __builtin_expect((x),0) |
|||
| msg287110 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2017年02月06日 09:00 | |
New changeset f5ef851ff6b26529382747cfea4674158c7c1ebc by Serhiy Storchaka in branch 'master': Issue #29460: _PyArg_NoKeywords(), _PyArg_NoStackKeywords() and https://github.com/python/cpython/commit/f5ef851ff6b26529382747cfea4674158c7c1ebc |
|||
| msg287111 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2017年02月06日 09:13 | |
> 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 doubt it can have any measurable effect when used once per a call of a function calling PyArg_Parse* and using many other stuff. |
|||
| msg287114 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2017年02月06日 09:47 | |
I created the issue #29461: "Experiment usage of likely/unlikely in CPython core". |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:42 | admin | set | github: 73646 |
| 2017年02月06日 09:47:13 | vstinner | set | messages: + msg287114 |
| 2017年02月06日 09:13:28 | serhiy.storchaka | set | messages: + msg287111 |
| 2017年02月06日 09:00:23 | python-dev | set | messages: + msg287110 |
| 2017年02月06日 08:50:04 | vstinner | set | messages: + msg287106 |
| 2017年02月06日 08:42:42 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017年02月06日 08:42:12 | python-dev | set | nosy:
+ python-dev messages: + msg287105 |
| 2017年02月06日 08:32:57 | rhettinger | set | messages: + msg287104 |
| 2017年02月06日 08:09:51 | serhiy.storchaka | create | |