Skip to content
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

Optimize signed variants of getAmount0Delta and getAmount1Delta #677

Closed
wants to merge 3 commits into from

Conversation

shuhuiluo
Copy link
Contributor

Factored out of #258.

Related Issue

Which issue does this pull request resolve?

Description of changes

The code in SqrtPriceMath has been refactored to optimize the functions getAmount0Delta and getAmount1Delta. The changes replaced previous return statements with inline assembly to handle operations on int256 more efficiently. This has resulted in reduction in bytecode size and runtime gas.

The code in `SqrtPriceMath` has been refactored to optimize the functions `getAmount0Delta` and `getAmount1Delta`. The changes replaced previous return statements with inline assembly to handle operations on `int256` more efficiently. This has resulted in reduction in bytecode size and runtime gas.
@hensha256 hensha256 mentioned this pull request May 22, 2024
@hensha256
Copy link
Contributor

Hi! Closing this as we are not going to be merging this change 🙏 we appreciate the time you took making this contribution!

@hensha256 hensha256 closed this Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants