Caching array length to save gas #123
Labels
bug
Something isn't working
G (Gas Optimization)
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Handle
pants
Vulnerability details
You can cache the array length to save length access gas cost at every iteration.
The following (bad) form appears at GovernorAlpha.sol line 571 and LinearVesting.sol line 72.
GovernorAlpha.sol example:
Change it to:
The text was updated successfully, but these errors were encountered: