[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-24 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: fixed -> rejected ___ Python tracker ___

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: "Why Roundup Robot spams with empty or almost empty messages?" It smells like the migration to GitHub started :-) -- ___ Python tracker

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Changes by Roundup Robot : Why Roundup Robot spams with empty or almost empty messages? -- ___ Python tracker

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- resolution: rejected -> fixed ___ Python tracker ___

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2c145e9eda756aa2001282d7c016e740dd00a2d7 by Victor Stinner in branch 'master': Document that _PyFunction_FastCallDict() must copy kwargs https://github.com/python/cpython/commit/2c145e9eda756aa2001282d7c016e740dd00a2d7 --

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- stage: -> resolved ___ Python tracker ___

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> rejected status: open -> closed ___ Python tracker ___

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: INADA Naoki: "Since mutating kw dict shouldn't affect caller's dict, caller and callee can't share the dict." Oh, I knew that, it's not the first time that I propose to implement this optimization and that I got this answer !? So I added a comment for myself,

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset fcba9c9d987b by Victor Stinner in branch 'default': Document that _PyFunction_FastCallDict() must copy kwargs https://hg.python.org/cpython/rev/fcba9c9d987b -- nosy: +python-dev ___ Python tracker

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > It can reduce number of hash() calls. Keys are strings (even interned strings), and hashes are cached. In most cases kw is empty or very small. I doubt any optimization can have significant effect. -- nosy: +serhiy.storchaka

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-01-19 Thread INADA Naoki
INADA Naoki added the comment: Since mutating kw dict shouldn't affect caller's dict, caller and callee can't share the dict. One possible optimization is using PyDict_Copy() to copy the dict. It can reduce number of hash() calls. -- ___ Python

[issue29318] Optimize _PyFunction_FastCallDict() for **kwargs

2017-01-19 Thread STINNER Victor
New submission from STINNER Victor: Example: --- def func(x, y): print(x, y) def proxy2(func, **kw): func(**kw) def proxy1(func, **kw): proxy2(func, **kw) --- The "proxy2(func, **kw)" call in proxy1() is currently inefficient: _PyFunction_FastCallDict() converts the dictionary