Cache array length in for
loops
#106
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
pmerkleplant
Vulnerability details
Impact
Caching the array length in a
for
-loop saves gas as the length does not needto be read on every iteration.
The following loops could be refactored:
Tools used
grep -rn ".length" .
The text was updated successfully, but these errors were encountered: