gh-132042: Remove resolve_slotdups() to speedup class creation (#132156)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Sergey Miryanov
2025-10-03 14:58:00 +05:00
committed by GitHub
parent aa99a7c70c
commit e6e376a760
6 changed files with 95 additions and 61 deletions

View File

@@ -672,11 +672,6 @@ struct _Py_interp_cached_objects {
/* object.__reduce__ */
PyObject *objreduce;
#ifndef Py_GIL_DISABLED
/* resolve_slotdups() */
PyObject *type_slots_pname;
pytype_slotdef *type_slots_ptrs[MAX_EQUIV];
#endif
/* TypeVar and related types */
PyTypeObject *generic_type;

View File

@@ -152,6 +152,9 @@ typedef int (*_py_validate_type)(PyTypeObject *);
extern int _PyType_Validate(PyTypeObject *ty, _py_validate_type validate, unsigned int *tp_version);
extern int _PyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);
// Precalculates count of non-unique slots and fills wrapperbase.name_count.
extern int _PyType_InitSlotDefs(PyInterpreterState *interp);
#ifdef __cplusplus
}
#endif