-
Notifications
You must be signed in to change notification settings - Fork 55
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
lower pow(x,1) to x #3774
lower pow(x,1) to x #3774
Conversation
!test --pybench |
PR Reviewer Guide 🔍(Review updated until commit 0b51ec7)Here are some key observations to aid the review process:
|
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.
Code duplication is a bit concerning. Can't you do some simplification? Something like:
for (int i = 0; i < exponent; ++I) {
if (i != 0) {
code_ << " * ";
}
code_ << lhs;
}
@Priya2698 do you know how to run thunder benchmark? I didn't find any thunder benchmark results in dashboard generated from this PR using |
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.
LGTM
!test --pybench --dev |
!build |
Partially solve #3629
Currently,
genPowerWithMul()
only handles case with factor of 2 & 3, fory = pow(x, 1.0)
, it should be lowered toy = x
which is much faster than the power version.