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
Specialize FOR_ITER via GET_ITER #32340
base: main
Are you sure you want to change the base?
Conversation
Microbenchmarks show very little change to range iteration, but a decent (~1.13x) speedup to list iteration.
|
pyperformance results (Geometric mean: 1.00x faster):
|
Can I review this or is it still WIP? |
Feedback/reviews/discussions are appreciated! I'm just not yet sure if this is a good approach at a high level. |
} | ||
} | ||
|
||
TARGET(FOR_ITER_RANGE) { |
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.
Just a random thought:
I noticed that for the two instructions, they are similar to the tp_iternext
functions of their respective types. Would it make more sense/save more code to just call them here and let PGO inline them? I'm not sure about the perf impact.
see faster-cpython/ideas#350