We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
++i is less expensive than i++ (https://github.com/fei-protocol/xTRIBE/blob/master/src/xTRIBE.sol#L99 and https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L189)
!=0 is cheaper and has the same effect as >0, since they’re uint variables (https://github.com/fei-protocol/flywheel-v2/blob/main/src/FlywheelCore.sol#L167 and https://github.com/fei-protocol/flywheel-v2/blob/main/src/FlywheelCore.sol#L218)
In these lines x – x % y has the same effect as ( x / x ) * y and saves about 26 gas from remix calculations (This optimization can be also made when calculating the after multiple, as x + y - x % y) https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L103 https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L135
The text was updated successfully, but these errors were encountered:
kebabsec issue #85
d563991
No branches or pull requests
++i is less expensive than i++ (https://github.com/fei-protocol/xTRIBE/blob/master/src/xTRIBE.sol#L99 and https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L189)
!=0 is cheaper and has the same effect as >0, since they’re uint variables (https://github.com/fei-protocol/flywheel-v2/blob/main/src/FlywheelCore.sol#L167 and https://github.com/fei-protocol/flywheel-v2/blob/main/src/FlywheelCore.sol#L218)
In these lines x – x % y has the same effect as ( x / x ) * y and saves about 26 gas from remix calculations (This optimization can be also made when calculating the after multiple, as x + y - x % y)
https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L103
https://github.com/fei-protocol/flywheel-v2/blob/main/src/rewards/FlywheelGaugeRewards.sol#L135
The text was updated successfully, but these errors were encountered: