-
-
Notifications
You must be signed in to change notification settings - Fork 3k
[mypyc] feat: PyObject_CallObject op for fn(*args) fastpath #19631
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
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
star_result = self.primitive_op(list_tuple_op, [star_result], line) | ||
if has_star2 and star2_result is None: | ||
if has_star2 and star2_result is None and len(star2_keys) > 0: |
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 think we might be able to get rid of has_star2 entirely with this PR
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.
Tests are failing -- can you have a look? Also, it would be good to check if the changes in this PR (and also the previous related PRs) are covered by run tests and add some if there are gaps in coverage.
IR tests are fixed, I still need to add run tests |
I added the same new test cases on both this PR and on #19630 |
for more information, see https://pre-commit.ci
This PR adds a new custom_op for PyObject_CallObject which is more efficient than PyObject_Call in cases where there are no kwargs. posarg-only use cases are already optimized but this is helpful for patterns such as
fn(*args)
orfn(a1, a2, *args)
This PR extends #19623 and #19629 , as this change will not be helpful until those PRs are merged.
I will rebase this PR on top as we go to keep everything as easy to review as possible.