Replies: 2 comments
-
I just added the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Preliminary gas savings:
The gas saving is non-negligible (at least 94 gas). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't remember why I did not wrap the calculations in the mostSignificantBit function in an
unchecked
block. That would definitely save a bit of gas.It's not like the
msb
value can ever overflow. And the shift operation is not covered by checked arithmetic anyway.Beta Was this translation helpful? Give feedback.
All reactions