Dennis Sweeney <[email protected]> added the comment:
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. ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue47067> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
