Skip to content

[eth]: Improve optimization runs to 10000 #406

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

Merged
merged 2 commits into from
Nov 30, 2022
Merged

Conversation

ali-behjati
Copy link
Collaborator

Now that the contract size is smaller we can increase the optimization runs again. This PR changes it to 10000. It changes contract size from 19.22KB to 21.16KB but saves more gas. Below is the snapshot difference:

testBenchmarkUpdatePriceFeedsIfNecessaryNotFresh() (gas: -24 (-0.014%)) 
testBenchmarkGetUpdateFee() (gas: -21 (-0.016%)) 
testBenchmarkGetEmaPrice() (gas: -18 (-0.071%)) 
testBenchmarkGetPrice() (gas: -30 (-0.128%)) 
testBenchmarkUpdatePriceFeedsIfNecessaryFresh() (gas: -801 (-0.212%)) 
testBenchmarkUpdatePriceFeedsFresh() (gas: -801 (-0.224%)) 
testBenchmarkParsePriceFeedUpdatesForTwoPriceFeed() (gas: -741 (-0.233%)) 
testBenchmarkUpdatePriceFeedsNotFresh() (gas: -741 (-0.235%)) 
testBenchmarkParsePriceFeedUpdatesForOnePriceFeed() (gas: -741 (-0.238%)) 
testBenchmarkParsePriceFeedUpdatesForOnePriceFeedNotWithinRange() (gas: -747 (-0.239%)) 

This PR also modifies a comment for a deprecated state variable.

@ali-behjati ali-behjati merged commit f8447f8 into main Nov 30, 2022
@ali-behjati ali-behjati deleted the eth/minor-improvements branch November 30, 2022 14:56
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.

3 participants