Closed tmpolaczyk closed 4 years ago
The only affected method is _decomposeScalar, where the improvement is from 937567 average gas used to 62303 (15x).
Since _sqrt is not used anymore, I removed it. Is that ok?
Output of yarn gas-analysis:
yarn gas-analysis
Old:
········································|···························|·············|····························· | Methods · 20 gwei/gas · 213.25 usd/eth │ ··················|·····················|·············|·············|·············|··············|·············· | Contract · Method · Min · Max · Avg · # calls · usd (avg) │ ··················|·····················|·············|·············|·············|··············|·············· | EcGasHelper · _decomposeScalar · 653611 · 1078579 · 937567 · 134 · 4.00 │ ··················|·····················|·············|·············|·············|··············|··············
New:
········································|···························|·············|····························· | Methods · 20 gwei/gas · 186.43 usd/eth │ ··················|·····················|·············|·············|·············|··············|·············· | Contract · Method · Min · Max · Avg · # calls · usd (avg) │ ··················|·····················|·············|·············|·············|··············|·············· | EcGasHelper · _decomposeScalar · 56171 · 65801 · 62303 · 134 · 0.23 │ ··················|·····················|·············|·············|·············|··············|··············
The only affected method is _decomposeScalar, where the improvement is from 937567 average gas used to 62303 (15x).
Since _sqrt is not used anymore, I removed it. Is that ok?
Output of
yarn gas-analysis
:Old:
New: