Skip to content

gh-139103: Defer reference count mutable class attributes - #155876

Open
johng wants to merge 2 commits into
python:mainfrom
johng:worktree-ft-scaling-139103
Open

gh-139103: Defer reference count mutable class attributes#155876
johng wants to merge 2 commits into
python:mainfrom
johng:worktree-ft-scaling-139103

Conversation

@johng

@johng johng commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Mutable class attributes would not scale with more threads, adding defered reference counting to resolve it.

./python_main.exe Tools/ftscalingbench/ftscalingbench.py class_attribute Running benchmarks with 18 threads
class_attribute 6.3x slower

./python.exe Tools/ftscalingbench/ftscalingbench.py class_attribute Running benchmarks with 18 threads
class_attribute 8.0x faster

Mutable class attributes would not scale with more
threads, adding defered reference counting to resolve it.

./python_main.exe Tools/ftscalingbench/ftscalingbench.py class_attribute
Running benchmarks with 18 threads
class_attribute            6.3x slower

./python.exe Tools/ftscalingbench/ftscalingbench.py class_attribute
Running benchmarks with 18 threads
class_attribute            8.0x faster
@johng
johng marked this pull request as ready for review August 15, 2026 23:33
@johng

johng commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Happy to create a new issue for this if the linked one is not close enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant