Skip to content
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

Drop separate inlining pass for tiny functions #15509

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

cameel
Copy link
Member

@cameel cameel commented Oct 11, 2024

Part of #15508.

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

@cameel
Copy link
Member Author

cameel commented Oct 11, 2024

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
Copy link
Member Author

cameel commented Oct 11, 2024

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

Copy link

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 github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Oct 26, 2024
@cameel cameel removed the stale The issue/PR was marked as stale because it has been open for too long. label Oct 26, 2024
Copy link

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 github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Nov 10, 2024
@cameel cameel removed the stale The issue/PR was marked as stale because it has been open for too long. label Nov 10, 2024
Copy link

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 github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Nov 25, 2024
@cameel cameel removed the stale The issue/PR was marked as stale because it has been open for too long. label Nov 26, 2024
Copy link

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 github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Dec 10, 2024
@cameel cameel removed the stale The issue/PR was marked as stale because it has been open for too long. label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant