Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-116621: Set manual critical section for list.extend #116657

Merged
merged 6 commits into from Mar 12, 2024

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Mar 12, 2024

@corona10
Copy link
Member Author

@colesbury

IIUC, nogil-3.12 apply 2 approaches.

  1. Set critical sections for both types if rhs is a mutable type.
  2. Use specialized methods for two critical section cases to reduce performance regression.

In this PR, I only applied approach 1 for simple maintenance.
Please let me know if I miss something and if we have to add specialized methods mutable types.

@corona10

This comment was marked as off-topic.

@corona10
Copy link
Member Author

Added a special method for the set object.
I will submit the PR for PyDictKeys_Check /PyDictValues_Check / PyDictItems_Check in a separate single PR.

Objects/listobject.c Outdated Show resolved Hide resolved
Objects/listobject.c Outdated Show resolved Hide resolved
@corona10 corona10 requested a review from colesbury March 12, 2024 15:54
@corona10 corona10 merged commit 3325699 into python:main Mar 12, 2024
35 checks passed
@corona10 corona10 deleted the gh-116621 branch March 12, 2024 22:28
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
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.

None yet

3 participants