Cache array length outside of loop #86
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
G (Gas Optimization)
Handle
pmerkleplant
Vulnerability details
Impact
Caching the array length outside a loop in a variable saves reading it on each
iteration as long as the array's length is not changed during the loop.
Therefore, the following loops could be refactored:
Recommended Mitigation Steps
Use the following pattern for refactoring:
Tools used
grep
The text was updated successfully, but these errors were encountered: