Cache properties whose fget contains only LOAD_ATTR_INSTANCE - #418
Draft
tekknolagi wants to merge 1 commit into
Draft
Cache properties whose fget contains only LOAD_ATTR_INSTANCE#418tekknolagi wants to merge 1 commit into
tekknolagi wants to merge 1 commit into
Conversation
Owner
Author
|
TODO:
|
This comment was marked as outdated.
This comment was marked as outdated.
tekknolagi
force-pushed
the
mb-inline-property-access
branch
from
November 30, 2022 10:29
887475d to
e37a431
Compare
This comment was marked as outdated.
This comment was marked as outdated.
tekknolagi
force-pushed
the
mb-inline-property-access
branch
from
December 1, 2022 03:12
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.
tekknolagi
commented
Dec 7, 2022
| if (isCachedLoadAttr(thread, callee, &attr_location)) { | ||
| rewriteCurrentBytecode(frame, LOAD_ATTR_INSTANCE); | ||
| icUpdateAttr(thread, caches, cache, receiver_layout_id, | ||
| attr_location, name, dependent); |
Owner
Author
There was a problem hiding this comment.
Add insertDependencyForTypeLookupInMro for callee instance attr name
Owner
Author
|
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 ```
tekknolagi
force-pushed
the
mb-inline-property-access
branch
from
March 23, 2023 13:45
5bff135 to
fd83cd1
Compare
tekknolagi
commented
Mar 23, 2023
| if (isCachedLoadAttr(thread, callee, &attr_location)) { | ||
| rewriteCurrentBytecode(frame, LOAD_ATTR_INSTANCE); | ||
| icUpdateAttr(thread, caches, cache, receiver_layout_id, | ||
| attr_location, name, dependent); |
Owner
Author
There was a problem hiding this comment.
Cache the attr name of the actual attribute?
Summary
Base vs. New
CPython vs New
Base
New
CPython
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
property.fget is immutable once set.