[issue36904] Implement _PyStack_UnpackDict() with a single allocation

Jeroen Demeyer report at bugs.python.org
Mon May 13 11:22:54 EDT 2019


New submission from Jeroen Demeyer <J.Demeyer at UGent.be>:

_PyStack_UnpackDict() is used to convert from the FastCallDict calling convention to FastCallKeywords. It currently needs two allocations: one for the tuple of keyword names and one for the array of arguments (positional and keyword).

This can be optimized by using a single allocation, storing everything in a single tuple. That tuple can then be artificially truncated to the required size when done.

----------
components: Library (Lib)
messages: 342339
nosy: Mark.Shannon, jdemeyer, petr.viktorin, scoder
priority: normal
severity: normal
status: open
title: Implement _PyStack_UnpackDict() with a single allocation
type: performance
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36904>
_______________________________________


More information about the Python-bugs-list mailing list