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.

Author Dennis Sweeney
Recipients Dennis Sweeney, JelleZijlstra, corona10, gvanrossum, kj, penguin_wwy
Date 2022-03-20.19:54:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647806092.62.0.56191624086.issue47067@roundup.psfhosted.org>
In-reply-to
Content
I profiled dict[str, int](a=1, b=2), and it looks like a decent chunk of time comes from PyUnicode_New as used by PyObject_SetAttrString.

You could also try replacing PyObject_SetAttrString with PyObject_SetAttr and adding "__orig_class__" to the global strings with Tools/scripts/generate_global_objects.py, probably for a later PR.
History
Date User Action Args
2022-03-20 19:54:52Dennis Sweeneysetrecipients: + Dennis Sweeney, gvanrossum, JelleZijlstra, corona10, kj, penguin_wwy
2022-03-20 19:54:52Dennis Sweeneysetmessageid: <1647806092.62.0.56191624086.issue47067@roundup.psfhosted.org>
2022-03-20 19:54:52Dennis Sweeneylinkissue47067 messages
2022-03-20 19:54:52Dennis Sweeneycreate