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-125174: Make immortal objects more robust, following design from PEP 683#125251

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

Merged

Conversation

@markshannon
Copy link
Member

@markshannonmarkshannon commentedOct 10, 2024
edited by bedevere-appbot
Loading

@markshannon
Copy link
MemberAuthor

This is not a complete fix for#125174, just enough to unblock other work

@markshannonmarkshannon added the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelOct 10, 2024
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@markshannon for commit94f8fd0 🤖

If you want to schedule another build, you need to add the🔨 test-with-refleak-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-refleak-buildbotsTest PR w/ refleak buildbots; report in status section labelOct 10, 2024
@markshannon
Copy link
MemberAuthor

The two "failing" refleak buildbots seem to be hanging intest.test_concurrent_futures.test_shutdown. There are no reported refleaks.

@markshannon
Copy link
MemberAuthor

Performance impact:

Overall a small slowdown, with a large 7-10% slowdown on nbody.
This is almost certainly due to the regression in stack spilling around_Py_IsImmortal_Loose fixedhere.

ARM 64 darwin
x86-64 linux

I'll re-run the linux benchmarks with the fix as a sanity check.

@markshannon
Copy link
MemberAuthor

Windows shows an over 2% improvement. With the regression fixed, this I would expect this to be more than 3%.

This reason for this is that the MSVC does not convertunsigned int x; x > (1 << 31) intosigned x; x < 0 as do clang and gcc.
This PR uses thesigned x; x < 0 form. Hence the speedup.

mdboom reacted with hooray emoji

@markshannon
Copy link
MemberAuthor

x86-64 linux performance numbers are a bit noisy, but show no significant change.

@markshannonmarkshannon merged commitc901437 intopython:mainOct 10, 2024
62 of 67 checks passed
@markshannonmarkshannon deleted the more-robust-immortality branchOctober 10, 2024 17:20
tacaswell added a commit to tacaswell/msgspec that referenced this pull requestOct 24, 2024
python/cpython#125251 renamed_PY_IMMORTAL_REFCNT -> _PY_IMMORTAL_INITIAL_REFCNT
jcrist added a commit to jcrist/msgspec that referenced this pull requestOct 24, 2024
* MNT: account for CPython 314 changespython/cpython#125251 renamed_PY_IMMORTAL_REFCNT -> _PY_IMMORTAL_INITIAL_REFCNT* Define new macro to reduce duplication---------Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303kumaraditya303 is a code owner

@methanemethaneAwaiting requested review from methanemethane is a code owner

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@markshannon@bedevere-bot@iritkatriel

[8]ページ先頭

©2009-2025 Movatter.jp