-
Notifications
You must be signed in to change notification settings - Fork 224
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
perf: avoid in place operator where ineffective #372
perf: avoid in place operator where ineffective #372
Conversation
6ab1f34
to
4056c5d
Compare
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
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
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
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 tried to only include small fixes/ changes related to the commit, yet there appears to be a lot of redundant or unneeded variables or calculations. Perhaps a separate pr may be needed to fix these.
tachyon/math/elliptic_curves/short_weierstrass/jacobian_point_impl.h
Outdated
Show resolved
Hide resolved
tachyon/math/elliptic_curves/short_weierstrass/jacobian_point_impl.h
Outdated
Show resolved
Hide resolved
tachyon/math/elliptic_curves/short_weierstrass/projective_point_impl.h
Outdated
Show resolved
Hide resolved
This commit enhances performance by utilizing the `c = a op b` style instead of `c = a; c inplace-op b`. While the former style is nearly as performant as the latter when `a` is movable, it becomes inefficient when operating on prime fields or points on elliptic curves that are not able to be moved. This change ensures better performance and readability, reducing 2 lines to 1. Note that irrelevant changes may occur due to this adjustment.
4056c5d
to
edde91e
Compare
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
Description
This commit enhances performance by utilizing the
c = a op b
style instead ofc = a; c inplace-op b
. While the former style is nearly as performant as the latter whena
is movable, it becomes inefficient when operating on prime fields or points on elliptic curves that are not able to be moved. This change ensures better performance and readability, reducing 2 lines to 1. Note that irrelevant changes may occur due to this adjustment.