Skip to content

The check to see if we have no weakrefs isn't correct #118519

Closed

Description

@DinoV

Bug report

Bug description:

https://github.com/python/cpython/blob/main/Objects/weakrefobject.c#L991

This is checking if we have a list at all, rather than if the list is empty. This is causing a slow down that's pretty significant on free-threaded builds

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added a commit that references this issue on May 2, 2024
  2. added a commit that references this issue on May 8, 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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions