diamond-3-hardhat
diamond-3-hardhat copied to clipboard
Slight for loop gas optimization
- Changed increment operations to use pre-increment instead of post-increment to save an extra operation
- for loop iterator incrementing is moved into an unchecked block to skip overflow checks and save gas - given that
ihas a maximum limit set by the loop, there are no downsides for this approach
@redsh4de I appreciate this. I found one bug in the pull request. Please fix and I can merge. Thanks for your help.
That should take care of it! @mudgen