FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-115999: Add free-threaded specialization for COMPARE_OP by Yhg1s · Pull Request #126410 · python/cpython · GitHub

/ cpython Public

gh-115999: Add free-threaded specialization for COMPARE_OP - #126410

Merged
Yhg1s merged 5 commits into
python:mainfrom
Yhg1s:compare_op
Jan 7, 2025
Merged

gh-115999: Add free-threaded specialization for COMPARE_OP#126410
Yhg1s merged 5 commits into
python:mainfrom
Yhg1s:compare_op

Conversation

Yhg1s commented Nov 4, 2024
edited
Loading

Copy link
Copy Markdown
Member

Add free-threaded specialization for COMPARE_OP, and tests for COMPARE_OP specialization in general. This relies on thread-local bytecode and atomic operations to update the counters and bytecode, which are single operations.

mpage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM! Please add a short explanation of why the specialized instructions are thread-safe to either the pull request or the commit (when it's merged).

markshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

The approach looks sound, but the test will need moving and should not rely on specific sequences of instructions.

Comment thread Lib/test/test_dis.py Outdated

bedevere-app Bot commented Nov 6, 2024

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Comment thread Python/specialize.c
Comment thread Python/specialize.c Outdated

Yhg1s left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

PTAL.

Comment thread Python/specialize.c
Comment thread Lib/test/test_dis.py Outdated

Yhg1s commented Dec 11, 2024

Copy link
Copy Markdown
Member Author

PTAL.

Sorry, that's Google for:

I have made the requested changes; please review again.

bedevere-app Bot commented Dec 11, 2024

Copy link
Copy Markdown

Thanks for making the requested changes!

@markshannon, @mpage: please review the changes made to this pull request.

bedevere-app Bot requested review from markshannon and mpage December 11, 2024 14:12

mpage left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. I queued benchmark runs for both the free-threaded and default builds for this PR. Let's wait until we have the results before merging this.

mpage commented Dec 12, 2024

Copy link
Copy Markdown
Contributor

Performance doesn't look like a blocker:

Yhg1s commented Dec 17, 2024

Copy link
Copy Markdown
Member Author

@markshannon All your concerns should have been addressed, do you want to take another look?

corona10 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm

Copy link
Copy Markdown
Member

@mpage, @Yhg1s I think that it's okay to merge this PR at this moment :)

Yhg1s commented Dec 20, 2024

Copy link
Copy Markdown
Member Author

@mpage, @Yhg1s I think that it's okay to merge this PR at this moment :)

Well, not according to GitHub's UI :)

I want to give Mark the chance to review it again before I merge it, and a week and a half is not a long time when dealing with what is effectively a volunteer workforce :)

Yhg1s merged commit 8f93dd8 into python:main Jan 7, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
…hon#126410)

Add free-threaded specialization for COMPARE_OP, and tests for COMPARE_OP specialization in general.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
Yhg1s deleted the compare_op branch August 13, 2026 12:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL