Skip to content

Optimize signed variants of getAmount0Delta and getAmount1Delta#677

Closed
shuhuiluo wants to merge 3 commits into
Uniswap:mainfrom
shuhuiluo:get-amount-delta-signed
Closed

Optimize signed variants of getAmount0Delta and getAmount1Delta#677
shuhuiluo wants to merge 3 commits into
Uniswap:mainfrom
shuhuiluo:get-amount-delta-signed

Conversation

@shuhuiluo

Copy link
Copy Markdown
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
Copy Markdown
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