New GitHub issue #118519 from DinoV:<br>

<hr>

<pre>
# 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

<!-- gh-linked-prs -->
### Linked PRs
* gh-118520
<!-- /gh-linked-prs -->

</pre>

<hr>

<a href="https://github.com/python/cpython/issues/118519">View on GitHub</a>
<p>Labels: type-bug, topic-free-threading</p>
<p>Assignee: </p>