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-93911: LOAD_ATTR_PROPERTY
#93912
gh-93911: LOAD_ATTR_PROPERTY
#93912
Conversation
LOAD_ATTR_PROPERTY
LOAD_ATTR_PROPERTY
Looks good, just a few minor nits.
Have you benchmarked this?
@@ -0,0 +1,26 @@ | |||
#ifndef Py_INTERNAL_DESCROBJECT_H |
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.
Maybe "pycore_property.h" as it is just the property struct.
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.
I'm leaving it generic from now (and naming it after the file it came from) so that I can re-use it again in the future when I add more specialisations. (E.g. classmethod is also from the same file)
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.
Do properties and classmethods really belong in the same file? Sure, they are both descriptors, but so are Python functions.
The file layout is a bit of an historical artifact.
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.
If you don't want to change it for this PR, that's fine too.
When you're done making the requested changes, leave the comment: |
No, and I don't expect it to affect pypyerformance. None of the pyperformance benchmarks have For real-world code, this should be a win, property is quite common. |
Sounds like we need more benchmarks. |
Thanks for the reviews Mark. I'm merging this so that it unblocks your work (I'm also working on other specializations that are waiting on this). (Running a refleak full test run locally before merging). |
|
Linked to #93911.