Convert certain mod(mul(X, Y), A) into mulmod(X, Y, A) #10688
Comments
May also be worth considering converting |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May also be worth considering converting |
If
A
is a constant that divides2**256
(so basically of the form2**N
), then the two expressions should be the same.mod(mul(X, Y), A)
costs 10 andmulmod(X, Y, A)
costs8
(excluding the shorter deploy code.)The text was updated successfully, but these errors were encountered: