[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2021-09-21 Thread STINNER Victor
STINNER Victor added the comment: No activity for 2 years, I close the issue. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___

[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2019-04-05 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: This might be solvable using PEP 580 by using METH_VARARGS instead of METH_FASTCALL for such functions. This would still require a temporary tuple for the positional args but no additional dict would need to be allocated. -- nosy: +jdemeyer

[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2018-07-12 Thread STINNER Victor
STINNER Victor added the comment: Yeah, I recall these issues since I wrote them :-D The fix for bpo-29318 was to document that we must copy the kwargs dict ;-) But this issue is not about the copy of the kwargs dict, but about two useless conversions: kwargs dict -> kwnames tuple -> kwargs

[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2018-07-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Related issues with similar discussion in the past : https://bugs.python.org/issue27840 https://bugs.python.org/issue29318 - Similar discussion where PyDict_Copy was proposed Thanks -- nosy: +xtreak

[issue34090] Python function call optimization: avoid temporary tuple to pass **kwargs

2018-07-10 Thread STINNER Victor
New submission from STINNER Victor : On the following code, f() uses CALL_FUNCTION_EX bytecode to call g(). The bytecode loads 'kw' variable which is a dictionary. But internally, the dictionary is converted to a temporary tuple, and later a new dictionary is created. Maybe the temporary