[Solidity] The impact of variable ordering on gas
Sep 11, 2018
You may not know that the order of declaration of variables will also affect the consumption of Gas.
Since the EVM operations are all performed in units of 32 bytes, the compiler will attempt to package the variables into a 32 bytes set for access, so as to reduce access times.
β¦