GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Collect cycles through sets, frozensets and set iterators by 1ndahous3 · Pull Request #9343 · RustPython/RustPython Conversation
|
| Operation | main | This patch |
|---|---|---|
| Temporary set union (24 elements) | 821 ns | 816 ns |
| Temporary frozenset union (24 elements) | 827 ns | 863 ns |
| Frozenset union (256 integers) | 3.05 µs | 3.47 µs |
| Full GC with 30,000 live singleton frozensets | 2.50 ms | 2.35 ms |
| Operation | main | This patch |
|---|---|---|
| Temporary set union (24 elements) | 707 ns | 731 ns |
| Temporary frozenset union (24 elements) | 720 ns | 804 ns |
| Frozenset union (256 integers) | 2.84 µs | 3.19 µs |
| Full GC with 30,000 live singleton frozensets | 2.35 ms | 1.89 ms |
Checking frozenset eligibility adds a linear scan of the result's keys. The union measurements include destruction of the temporary result.
Written with Codex (GPT-6), reviewed by a human before submission.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Assisted-by: Codex:GPT-6
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Payload GC and deallocation policy crates/vm/src/object/payload.rs, crates/vm/src/object/core.rs |
PyPayload adds needs_gc and CLEAR_ON_DEALLOC. Object creation uses the payload’s GC eligibility alongside dict-backed and heap-type tracking rules. Default deallocation clears payloads only when the payload opts in or uses a freelist. |
Set traversal, tracking, and validation crates/vm/src/builtins/set.rs, crates/vm/src/dict_inner.rs |
Set payloads manually traverse and clear table entries only when the table has one owner. Frozenset tracking checks subclasses, table sharing, and key GC edges. Tests cover deferred key release, shared tables, and frozenset tracking cases. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Suggested reviewers: youknowone, shaharnaveh
cbf92No actionable merge-blocking risk remains; the change is mergeable after normal checks.
Explanation
The title "Collect cycles through sets, frozensets and set iterators" matches the main change. The raw summary and PR objectives show GC traversal and clearing for PySet, PyFrozenSet, and set iterators, plus the needs_gc and CLEAR_ON_DEALLOC additions that support cycle collection through these types. The title is specific and concise, and it names the primary change for a reviewer scanning history.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [ ] test: cpython/Lib/test/test_set.py (TODO: 1) dependencies: dependent tests: (no tests depend on set) Legend:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: cbf92d3163
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Integrate main at 9bd84b2 while preserving the published mega history. Keep the authentic profiler locator and capabilities from RustPython#9340, set-cycle GC from RustPython#9343, backward-compatible bytecode tooling from RustPython#9344, package paths from RustPython#9345, canonical Levenshtein coverage from RustPython#9346, and the safe full-width None-return scanner from RustPython#9347. Regenerate support helpers through the official updater from unchanged CPython d220409a13b7, preserving four exact existing-main neighborhoods. Retain the newer main specialization/C-stack helpers, Cargo environment adaptation, prior isolation checks and remaining Python 3.15 updates. The obsolete manual capability guard is superseded by the genuine API. Preserve unlanded explicit sharing modes and opcode override support. Ruff and XML vendor sources remain unchanged. Validation: normal hooks, locked host_env/VM/stdlib library check and strict Clippy, and the default CLI build. No target-runtime or full-suite pass is claimed for this composition. Assisted-by: OpenAI Codex:model version unavailable
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.