flintlang / flint

The Flint Programming Language for Smart Contracts
MIT License
244 stars 18 forks source link

Pack multiple variables into single EVM storage slot if possible #57

Open franklinsch opened 6 years ago

franklinsch commented 6 years ago

i.e. store four 64-bit integers in a single storage slot

Solidity documentation: https://solidity.readthedocs.io/en/develop/miscellaneous.html#layout-of-state-variables-in-storage

franklinsch commented 6 years ago

YUL has a convenient combineu64tou256 function

DJRHails commented 5 years ago

This will become relevant when we aren't using 256-bits for every type except for Addresses.