Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Nov 19, 2024

Remove the code to lazily track and untrack dictionaries.

Benchmarks show a ~1% speedup.


📚 Documentation preview 📚: https://cpython-previews--127027.org.readthedocs.build/

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 19, 2024
@bedevere-bot
Copy link

🤖 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.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 19, 2024
>>> gc.is_tracked([])
True
>>> gc.is_tracked({})
False
Copy link
Member

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?

Copy link
Member Author

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.

@markshannon
Copy link
Member Author

The windows buildbot failures are unrelated to this PR.

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,
Copy link
Member

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.

@markshannon
Copy link
Member Author

The aarch64-unknown-linux-gnu/gcc (Debug) failures seem unrelated to this PR (probably timeout related) and there are no leaks.

@markshannon markshannon merged commit aea0c58 into python:main Nov 20, 2024
58 of 59 checks passed
@markshannon markshannon deleted the eager-dict-tracking branch January 10, 2025 16:23
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants