Skip to content

Specialization of member descriptors only handles Py_T_OBJECT_EX but _Py_T_OBJECT seems more common #111772

Closed

Description

@markshannon

Despite _Py_T_OBJECT being marked as deprecated in descrobject.h it is commonly used in the standard library.
LOAD_ATTR_SLOT de-optimizes if the stored value is NULL. If the stored value is not NULL, both _Py_T_OBJECT and Py_T_OBJECT_EX act the same, so we can reuse LOAD_ATTR_SLOT for _Py_T_OBJECT.

For storing attributes, _Py_T_OBJECT and Py_T_OBJECT_EX are exactly the same.

I don't know why _Py_T_OBJECT is deprecated, the semantics seem quite reasonable.

Linked PRs

Activity

  1. added
    performance
    on Nov 6, 2023
  2. added a commit that references this issue on Nov 6, 2023
  3. added a commit that references this issue on Nov 8, 2023
  4. added a commit that references this issue on Feb 11, 2024
  5. added a commit that references this issue on Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions