Skip to content

Conversation

@Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Dec 11, 2025

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you leave the STACK_SIZE macro unchanged to avoid confusion and change https://github.com/python/cpython/pull/142576/files#diff-eac5ab7e741b8b825a24d31a5bf844e86086431fb698cfcabe1277b68c375ca2L199
instead.

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. Thanks.

@markshannon
Copy link
Member

One thing to note for the future: We are losing the ability to reuse one of the operands if its refcount was one. A possible future optimization is to not only track which references are deferred, but which are the only reference to the object. We can then avoid the allocation & deallocation that occurs in a + b + c

@Fidget-Spinner Fidget-Spinner merged commit 0ac4e6c into python:main Dec 15, 2025
76 checks passed
@Fidget-Spinner Fidget-Spinner deleted the decref_float_refactor branch December 15, 2025 19:39
fatelei pushed a commit to fatelei/cpython that referenced this pull request Dec 16, 2025
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.

2 participants