solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Drop separate inlining pass for tiny functions

Open cameel opened this issue 1 year ago • 2 comments

Part of #15508.

Not sure if we should do this, but it seems somewhat promising so I want to see the gas numbers.

cameel avatar Oct 11 '24 18:10 cameel

gas_diff_stats

File name IR optimized Legacy optimized Legacy
userDefinedValueType/erc20.sol 1%
array/copying/copy_byte_array_to_storage.sol +0%
array/copying/array_of_function_external_storage_to_storage_dynamic.sol +0%
abiEncoderV2/storage_array_encoding.sol +0%
array/copying/nested_array_of_structs_storage_to_storage.sol +0%
various/destructuring_assignment.sol +0%
array/copying/array_elements_to_mapping.sol +0%
array/copying/copy_byte_array_in_struct_to_storage.sol +0%
calldata/copy_from_calldata_removes_bytes_data.sol +0%
array/copying/array_nested_calldata_to_storage.sol +0%
array/copying/nested_array_of_structs_calldata_to_storage.sol +0%
array/copying/nested_array_of_structs_memory_to_storage.sol +0%
array/copying/elements_of_nested_array_of_structs_calldata_to_storage.sol +0%
array/copying/elements_of_nested_array_of_structs_memory_to_storage.sol +0%
array/copying/function_type_array_to_storage.sol -0%
externalContracts/snark.sol -0%
byte_array_to_storage_cleanup.sol -8%
array/copying/cleanup_during_multi_element_per_slot_copy.sol -18%

cameel avatar Oct 11 '24 20:10 cameel

External tests

ir-no-optimize

project bytecode_size deployment_gas method_gas
brink 0%
colony 0%
elementfi 0%
ens 0%
euler
gnosis
gp2 0%
pool-together 0%
uniswap 0%
yield_liquidator 0% 0% 0%
zeppelin

ir-optimize-evm+yul

project bytecode_size deployment_gas method_gas
brink 0%
colony +0%
elementfi -0.27% ✅
ens -1.77% ✅ -0.66% ✅ -0%
euler -0.14% ✅
gnosis
gp2 +0.15% ❌
pool-together +0.22% ❌
uniswap -4.62% ✅
yield_liquidator -1.54% ✅ -1.62% ✅ -0.11% ✅
zeppelin -2.62% ✅

ir-optimize-evm-only

project bytecode_size deployment_gas method_gas
brink 0%
colony 0%
elementfi 0%
ens 0% +0% 0%
euler
gnosis
gp2 0%
pool-together 0%
uniswap 0%
yield_liquidator 0% +0% 0%
zeppelin 0%

legacy-no-optimize

project bytecode_size deployment_gas method_gas
brink 0%
colony 0%
elementfi 0%
ens 0%
euler 0%
gnosis 0%
gp2 0%
pool-together 0%
uniswap 0%
yield_liquidator 0% -0% 0%
zeppelin

legacy-optimize-evm+yul

project bytecode_size deployment_gas method_gas
brink 0%
colony +0%
elementfi -0%
ens 0% +0% 0%
euler 0%
gnosis 0%
gp2 0%
pool-together 0%
uniswap 0%
yield_liquidator -0% -0% -0%
zeppelin -0.03% ✅

legacy-optimize-evm-only

project bytecode_size deployment_gas method_gas
brink 0%
colony 0%
elementfi 0%
ens 0% 0% 0%
euler 0%
gnosis 0%
gp2 0%
pool-together 0%
uniswap 0%
yield_liquidator 0% +0% 0%
zeppelin

!V = version mismatch !B = no value in the "before" version !A = no value in the "after" version !T = one or both values were not numeric and could not be compared -0 = very small negative value rounded to zero +0 = very small positive value rounded to zero

cameel avatar Oct 11 '24 20:10 cameel

This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days unless the stale label is removed.

github-actions[bot] avatar Oct 26 '24 12:10 github-actions[bot]

This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days unless the stale label is removed.

github-actions[bot] avatar Nov 10 '24 12:11 github-actions[bot]

This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days unless the stale label is removed.

github-actions[bot] avatar Nov 25 '24 12:11 github-actions[bot]

This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days unless the stale label is removed.

github-actions[bot] avatar Dec 10 '24 12:12 github-actions[bot]

This pull request is stale because it has been open for 14 days with no activity. It will be closed in 7 days unless the stale label is removed.

github-actions[bot] avatar Dec 27 '24 12:12 github-actions[bot]

This pull request was closed due to a lack of activity for 7 days after it was stale.

github-actions[bot] avatar Jan 03 '25 12:01 github-actions[bot]