Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks authored Sep 16, 2024
1 parent 43cf314 commit 5999bd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/reference/config/solidity-compiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ Whether or not to enable the Solidity optimizer.
- Default: 200
- Environment: `FOUNDRY_OPTIMIZER_RUNS` or `DAPP_OPTIMIZER_RUNS`

The amount of optimizer runs to perform.
The number of runs specifies roughly how often each opcode of the deployed code will be executed across the life-time of the contract. This means it is a trade-off parameter between code size (deploy cost) and code execution cost (cost after deployment). A `optimizer_runs` parameter of `1` will produce short but expensive code. In contrast, a larger `optimizer_runs` parameter will produce longer but more gas efficient code. The maximum value of the parameter is `2**32-1`.

A common misconception is that this parameter specifies the number of iterations of the optimizer. This is not true: The optimizer will always run as many times as it can still improve the code.

##### `via_ir`

Expand Down

0 comments on commit 5999bd0

Please sign in to comment.