-
Notifications
You must be signed in to change notification settings - Fork 47
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
General gas tweaks #63
Conversation
@@ -69,7 +102,7 @@ library TickBitmap { | |||
: (compressed - int24(uint24(bitPos))) * tickSpacing; | |||
} else { | |||
// start from the word of the next tick, since the current tick state doesn't matter | |||
(int16 wordPos, uint8 bitPos) = position(compressed + 1); | |||
(int16 wordPos, uint8 bitPos) = position(++compressed); |
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.
does this also help on gas ?? 😂
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.
it removes the compressed + 1
below (removing 1 additional operation) -- thus saving gas
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.
The end of optimization is basically rewriting everything in assembly 😂
Part 2 of #57
General minor gas tweaks to reduce gas