Dennis Sweeney <sweeney.dennis...@gmail.com> 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 <rep...@bugs.python.org>
<https://bugs.python.org/issue47067>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to