balancer / balancer-v3-monorepo

GNU General Public License v3.0
30 stars 7 forks source link

Easy and strange way to save 500 gas #670

Closed elshan-eth closed 1 month ago

elshan-eth commented 1 month ago

Description

I don't use _loadPoolData in _loadPoolDataUpdatingBalancesAndYieldFees in this PR because every return with memory in functions allocates a new empty value in memory. https://github.com/ethereum/solidity/issues/13294

I’m not sure if this is the only why gas decreased, perhaps the compiler made this in some other way.

Type of change

Checklist:

Issue Resolution