-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cache properties whose fget contains only LOAD_ATTR_INSTANCE #418
base: trunk
Are you sure you want to change the base?
Conversation
TODO:
|
This comment was marked as outdated.
This comment was marked as outdated.
887475d
to
e37a431
Compare
This comment was marked as outdated.
This comment was marked as outdated.
0891dd4
to
5bff135
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
if (isCachedLoadAttr(thread, callee, &attr_location)) { | ||
rewriteCurrentBytecode(frame, LOAD_ATTR_INSTANCE); | ||
icUpdateAttr(thread, caches, cache, receiver_layout_id, | ||
attr_location, name, dependent); |
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.
Add insertDependencyForTypeLookupInMro
for callee instance attr name
TODO: publish benchmark as a separate PR so we can get benchmark result in PR |
property.fget is immutable once set. ``` class C: @Property def foo(self): return self.value def test(c): return c.foo ```
5bff135
to
fd83cd1
Compare
if (isCachedLoadAttr(thread, callee, &attr_location)) { | ||
rewriteCurrentBytecode(frame, LOAD_ATTR_INSTANCE); | ||
icUpdateAttr(thread, caches, cache, receiver_layout_id, | ||
attr_location, name, dependent); |
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.
Cache the attr name of the actual attribute?
Summary
Base vs. New
CPython vs New
Base
New
CPython
|
property.fget is immutable once set.