Speed up "create class" #146
Replies: 4 comments
-
Previous attempt: https://bugs.python.org/issue32346 |
Beta Was this translation helpful? Give feedback.
-
One way to speed up class creation might be to not populate or use the "slots" at all and rely on the class's dict. Why slots aren't efficientThe global (now per interpreter?) method lookup cache works well for normal attribute lookups. There is no reason why it can't work for special names like For binary operations we are looking into a (theoretical) large and sparse 3D array |
Beta Was this translation helpful? Give feedback.
-
Unfortunately AFAIK the "method" lookup cache actually caches all class attributes including the descriptors used by slots. |
Beta Was this translation helpful? Give feedback.
-
I think Mark is referring to the C-level slots ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This operation seems rather baroque. We should profile it and speed it up.
(See also #32.)
Beta Was this translation helpful? Give feedback.
All reactions