Skip to content

Commit

Permalink
Write about multiple reads and writes
Browse files Browse the repository at this point in the history
  • Loading branch information
Denton-L committed Aug 26, 2016
1 parent 89489da commit 2d834f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/miscellaneous.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2d834f7

Please sign in to comment.