Cache array lengths when using for loops to save gas.
Since the for loops don't modify array.length, it is more gas-efficient to cache it in some local variable and use that variable instead, like in the following example:
Slither
When using for loops on arrays cache it's length in a local variable and use that within the for loop
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.