-
Notifications
You must be signed in to change notification settings - Fork 995
Route ModExp precompile in certain conditions #8868
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
Conversation
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.
results of the benchmarks attached, with improvements all across the board:
It's curious that even the cases with no optimisation triggered are better than before
| final int modulusLength = clampedToInt(length_of_MODULUS); | ||
| if ((extractLastByte(input, baseOffset, baseLength) & 1) != 1 | ||
| && (extractLastByte(input, modulusOffset, modulusLength) & 1) != 1) { | ||
| return computeNative(input, length_of_MODULUS); |
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.
maybe could pass int modulusLength instead of recalculating?
1169432 to
a38cd40
Compare
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Luis Pinto <luis.pinto@consensys.net>
a38cd40 to
74b580a
Compare

PR description
This is a cherry-pick from the performance branch that we used to test the changes in the latest interop.
original PR: #8758
Thanks for sending a pull request! Have you done the following?
doc-change-requiredlabel to this PR if updates are required.Locally, you can run these tests to catch failures early:
./gradlew spotlessApply./gradlew build./gradlew acceptanceTest./gradlew integrationTest./gradlew ethereum:referenceTests:referenceTests