-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-129984: Mark immortal objects as deferred #129985
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
Conversation
|
I think we probably don't want to mark immortal objects as deferred and instead should allow immortal objects to be stored in inline caches (i.e. check that the object either uses deferred refcounting or is immortal) |
|
I think this makes sense. When we are checking if an object uses deferred reference counting, we nearly always want to include immortal objects too. We can rename the flag if it improves clarity.
|
8e67151 to
1d65711
Compare
04d3398 to
2981305
Compare
2981305 to
fd742f4
Compare
colesbury
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Marks immortal objects as having the deferred reference counting bit, allowing these objects to be cached in the specializing interpreter loop.
Gets a significant perf win on deltablue where small ints are stored in a class and loaded repeatedly: https://github.com/facebookexperimental/free-threading-benchmarking/blob/main/results/bm-20250210-3.14.0a4%2B-8e67151-NOGIL/bm-20250210-vultr-x86_64-DinoV-immortal_deferred-3.14.0a4%2B-8e67151-vs-base.svg