-
Notifications
You must be signed in to change notification settings - Fork 39
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
Turn on IR optimizer #332
Labels
T-feature
Type: feature
Comments
Gas report diff
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📚 Context
The Solidity compiler comes with an IR optimized that is turned off by default.
This optimizer can improve gas costs of function calls and contract size.
After doing a quick experiment with Via-IR, I've observed significant reductions on both metrics.
Here are some functions with significant gas cost improvements (median discrepancy):
ApplicationFactory.newApplication
: -20.5%SelfHostedApplicationFactory.deployContracts
: -9.1%Application.validateOutput
: -9.7%Application.executeOutput
: -2.6%✔️ Solution
Turn Via-IR on
foundry.toml
andhardhat.config.ts
.The text was updated successfully, but these errors were encountered: