.length in a loop #212
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
pauliax
Vulnerability details
Impact
.length in a loop can be extracted into a variable and used where necessary to reduce the number of storage reads. Cache the length of the array and use this local variable when iterating over the storage array. This can be applied in functions findShareholder and _sendFees:
The text was updated successfully, but these errors were encountered: