semaphore
semaphore copied to clipboard
Little Gas Optimization
Description
++i costs a little less gas than i++
As i++ returns the non-incremented value & ++i returns the incremented value.
Related Issue
N/A
Does this introduce a breaking change?
- [ ] Yes
- [x] No
Other information
For More info check this: https://ethereum.stackexchange.com/questions/133161/why-does-i-cost-less-gas-than-i
And here are the gas snapshots,
Before:
After:
Thanks, AB Dee
P.S. I only changed 3 lines of code, other additions and deletions are just prettier's thing xD