-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-127010: Don't lazily track and untrack dicts #127027
Conversation
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 3c11dba 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
@@ -581,8 +575,6 @@ tracking status of the object. | |||
>>> gc.is_tracked({}) | |||
False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is empty dict still untracked?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is tracked. I'll update the docs.
The windows buildbot failures are unrelated to this PR. |
InternalDocs/garbage_collector.md
Outdated
collector footprint of simple instances. Some examples of native types that | ||
benefit from delayed tracking: | ||
collector footprint of simple instances. Historically, both dictionaries and | ||
tuples were untracked during garbage collection. Now it is only tuples: | ||
|
||
- Tuples containing only immutable objects (integers, strings etc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now a single-item bullet list.
The |
Remove the code to lazily track and untrack dictionaries.
Benchmarks show a ~1% speedup.
📚 Documentation preview 📚: https://cpython-previews--127027.org.readthedocs.build/