Open Fidget-Spinner opened 1 month ago
CC @saulshanabrook this is building off your work!
Nevermind, I forgot we yet to have a specialization for builtin class loads, so we can't do this until we add the tier 1 specialization.
For now, I can add this for tier 2 just for Python classes.
Feature or enhancement
Proposal:
Now that we have type versions installed in https://github.com/python/cpython/issues/119258 . We can use the information to constant propagate through attribute loads.
This means something like
dict.fromkeys()
becomes the same as
dict_fromkeys()
Note: this is just a constant load, not an attribute lookup!
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs