You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optimizer can put some things outside of the startGasReport/endGasReport frame (using gasReport modifier doesn't change this).
Usually it's unimportant, especially for costly functions, but it would be useful to have a way for gas-report command to optionally include the cost of a whole test function (like what forge test --gas-report --mt testName returns), ideally only the contents, without the function's overhead
(on 2nd thought, although I mention the optimizer it could be the compiler. I didn't delve into the specifics of everything that's going on here)
The text was updated successfully, but these errors were encountered:
That env var isn't a foundry thing, it's just used for conditional things within solidity.
Optimizer is a compiler flag so I don't think you can disable it for specific lines/tests/files. You could run a second set of tests without an optimizer, though that's a hassle.
Anyways it wouldn't be very useful imo, unoptimized code costs more gas and isn't representative of the real gas usage
The optimizer can put some things outside of the
startGasReport
/endGasReport
frame (usinggasReport
modifier doesn't change this).Usually it's unimportant, especially for costly functions, but it would be useful to have a way for
gas-report
command to optionally include the cost of a whole test function (like whatforge test --gas-report --mt testName
returns), ideally only the contents, without the function's overhead(on 2nd thought, although I mention the optimizer it could be the compiler. I didn't delve into the specifics of everything that's going on here)
The text was updated successfully, but these errors were encountered: