You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement _PyStack_UnpackDict() with a single allocation #81085
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-07-02.13:04:55.023>created_at=<Date2019-05-13.15:22:54.320>labels= ['interpreter-core', '3.8', 'performance']
title='Implement _PyStack_UnpackDict() with a single allocation'updated_at=<Date2019-07-02.13:04:55.022>user='https://github.com/jdemeyer'
_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.
Activity
jdemeyer commentedon May 13, 2019
_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.
jdemeyer commentedon May 13, 2019
Ideally, this would be fixed together with bpo-36907.
methane commentedon Jul 2, 2019
New changeset d4efd91 by Inada Naoki (Jeroen Demeyer) in branch 'master':
bpo-36904: Optimize _PyStack_UnpackDict (GH-14517)
d4efd91