Uniswap / v2-core

🦄 🦄 Core smart contracts of Uniswap V2
https://uniswap.org/docs
GNU General Public License v3.0
2.95k stars 3.16k forks source link

replace && with nested if to save gas #204

Closed molly-ting closed 11 months ago

molly-ting commented 1 year ago

The solidity compiler generates more code for “if (A && B) {}” than for “if (A) {if (B) {} }”. Replacing "if (A && B) {}" with "if (A) {if (B) {} }" can save gas.

stale[bot] commented 11 months ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.