-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: don't request unnecessary output (#231)
We're currently requesting all `evm.bytecode` (and `evm.deployedBytecode`) output by default. This includes `evm.bytecode.generatedSources`, introduced in solc 0.8.0, which is a list of potentially huge Yul AST objects that is completely unused in Foundry. Only request the `Compact*` bytecode fields in the defaults. This cuts down a clean `forge build`: - from 2:20m to 1:30m (-36%) on [superform-xyz/superform-core](https://github.com/superform-xyz/superform-core) - from 1:39m to 1:29m (-10%) on [sablier-labs/v2-core](https://github.com/sablier-labs/v2-core) - from 54.5s to 45.7s (-20%) on [sablier-labs/v2-core](https://github.com/sablier-labs/v2-core) (FOUNDRY_PROFILE=lite which is `optimizer = false`) It may have a larger impact when compiling with >=0.8.28, because the cache storing this data was removed in that version (ethereum/solidity@3c5e46b), or when optimizations are disabled as more IR will be generated and output to JSON. I verified that these inputs are accepted by solidity 0.4.14, 0.6.3, 0.8.28, and vyper 0.3.10, 0.4.0. All of these outputs are supported by all of them except for vyper which needs to be normalized. Drive-by: buffer stdin when writing to the solc subprocess.
- Loading branch information
Showing
14 changed files
with
132 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# pragma version ^0.4.0 | ||
|
||
@external | ||
@view | ||
def number() -> uint256: ... | ||
|
||
@external | ||
def set_number(new_number: uint256): ... | ||
|
||
@external | ||
def increment() -> uint256: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
from . import B | ||
import A as AAlias | ||
from .module import C |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
from ...module.inner import E | ||
Oops, something went wrong.