diff options
author | Denton Liu <liu.denton+github@gmail.com> | 2016-08-27 01:25:57 +0800 |
---|---|---|
committer | Denton Liu <liu.denton+github@gmail.com> | 2016-08-27 01:25:57 +0800 |
commit | 2d834f723a12ae7b33dc4d1ebd35578b8b584b52 (patch) | |
tree | 5d61623dccdef6f8c01d8aa80955c1bbbf94ee4e /docs | |
parent | 89489da4ccc80ef716db8c23ebd99cd06cc19a20 (diff) | |
download | dexon-solidity-2d834f723a12ae7b33dc4d1ebd35578b8b584b52.tar.gz dexon-solidity-2d834f723a12ae7b33dc4d1ebd35578b8b584b52.tar.zst dexon-solidity-2d834f723a12ae7b33dc4d1ebd35578b8b584b52.zip |
Write about multiple reads and writes
Diffstat (limited to 'docs')
-rw-r--r-- | docs/miscellaneous.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index e06a241f..69d4d310 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -22,9 +22,9 @@ Statically-sized variables (everything except mapping and dynamically-sized arra bytes to the desired size. It is only beneficial to use reduced-size arguments if you are dealing with storage values - because the compiler will pack multiple elements into one storage slot. When dealing with - function arguments or memory values, there is no inherent benefit because the compiler does not - pack these values. + because the compiler will pack multiple elements into one storage slot, and thus, combine + multiple reads or writes into a single operation. When dealing with function arguments or memory + values, there is no inherent benefit because the compiler does not pack these values. Finally, in order to allow the EVM to optimize for this, ensure that you try to order your storage variables such that they can be packed tightly. For example, declaring your storage |