unchecked { ++i } is more gas efficient than i++ for loops #25
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
GiveMeTestEther
Vulnerability details
Impact
The loop index increments can be written as unchecked { ++i } instead of simply i++ to save gas.
Two reasons:
Proof of Concept
see discussion here ethereum/solidity#10695
Tools Used
Visual Code Studio
Recommended Mitigation Steps
replace i++ with unchecked { ++i }
The text was updated successfully, but these errors were encountered: