Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-134043: use_Py_dict_lookup_unicode_threadsafe_stackref for dict lookup in_PyObject_GetMethodStackRef#136412

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kumaraditya303 wants to merge9 commits intopython:main
base:main
Choose a base branch
Loading
fromkumaraditya303:dict

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 commentedJul 8, 2025
edited
Loading

Changes_PyObject_GetMethodStackRef to use_Py_dict_lookup_threadsafe_stackref to avoid reference counting on deferred objects.

@kumaraditya303kumaraditya303 marked this pull request as ready for reviewJuly 8, 2025 12:05
Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

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

  1. We should add a scaling benchmark toftscalingbench.py for the relevant access pattern
  2. We probably need to avoidPy_INCREF(dict) and that's going to require refactoring. You can safely avoidPy_INCREF(dict) in the same cases where_Py_dict_lookup_threadsafe_stackref is relevant: when the dictionary keys areDICT_KEYS_UNICODE.

@colesbury
Copy link
Contributor

This needs more refactoring - we can't load the keys twice like this because the condition might not hold.

@kumaraditya303kumaraditya303 changed the titlegh-134043: use_Py_dict_lookup_threadsafe_stackref for dict lookup in_PyObject_GetMethodStackRefgh-134043: use_Py_dict_lookup_unicode_threadsafe_stackref for dict lookup in_PyObject_GetMethodStackRefJul 18, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@colesburycolesburycolesbury left review comments

@ZeroIntensityZeroIntensityAwaiting requested review from ZeroIntensityZeroIntensity is a code owner

@methanemethaneAwaiting requested review from methanemethane is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kumaraditya303@colesbury

[8]ページ先頭

©2009-2025 Movatter.jp