morpho-org / morpho-utils

Repository gathering useful libraries and contracts.
GNU Affero General Public License v3.0
65 stars 1 forks source link

Refactoring log2 gas report #89

Closed QGarchery closed 1 year ago

QGarchery commented 1 year ago

To show gas-report

github-actions[bot] commented 1 year ago

Changes to gas cost

Generated at commit: 09696749d04fad41220b8e98fc18fbf46ed78bbe, compared to commit: 8ecc6cdb3261467f7ac1e4feae91c022e84467ea

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %

Full diff report 👇
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **WadRayMathMock contract** | 140,583 (-81,880) | _rayDiv_
_rayMul_
_rayToWad_
_wadDiv_
_wadMul_
_wadToRay_ | 364 (+44)
378 (+22)
337 (-23)
408 (+22)
334 (-23)
261 (-7) | **+13.75%**
**+6.18%**
**-6.39%**
**+5.70%**
**-6.44%**
**-2.61%** | 397 (+44)
426 (+22)
337 (-23)
441 (+22)
382 (-23)
299 (-9) | **+12.46%**
**+5.45%**
**-6.39%**
**+5.25%**
**-5.68%**
**-2.92%** | 364 (+44)
426 (+22)
337 (-23)
408 (+22)
382 (-23)
299 (-9) | **+13.75%**
**+5.45%**
**-6.39%**
**+5.70%**
**-5.68%**
**-2.92%** | 465 (+44)
475 (+22)
337 (-23)
509 (+22)
431 (-23)
337 (-12) | **+10.45%**
**+4.86%**
**-6.39%**
**+4.52%**
**-5.07%**
**-3.44%** | 3 (0)
2 (0)
1 (0)
3 (0)
2 (0)
2 (0) | | **WadRayMathRef contract** | 147,190 (-82,079) | _rayDiv_
_rayMul_
_rayToWad_
_wadDiv_
_wadMul_
_wadToRay_ | 476 (+44)
479 (+22)
364 (-23)
520 (+22)
435 (-23)
337 (-23) | **+10.19%**
**+4.81%**
**-5.94%**
**+4.42%**
**-5.02%**
**-6.39%** | 476 (+44)
479 (+22)
364 (-23)
520 (+22)
435 (-23)
337 (-23) | **+10.19%**
**+4.81%**
**-5.94%**
**+4.42%**
**-5.02%**
**-6.39%** | 476 (+44)
479 (+22)
364 (-23)
520 (+22)
435 (-23)
337 (-23) | **+10.19%**
**+4.81%**
**-5.94%**
**+4.42%**
**-5.02%**
**-6.39%** | 476 (+44)
479 (+22)
364 (-23)
520 (+22)
435 (-23)
337 (-23) | **+10.19%**
**+4.81%**
**-5.94%**
**+4.42%**
**-5.02%**
**-6.39%** | 1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0) | | **MathRef contract** | 222,263 (+22,018) | _divUp_
_log2Dichotomy_
_log2Naive_
_max_
_min_
_zeroFloorSub_ | 577 (-22)
4,813 (+22)
85,605 (-1,063)
336 (+23)
368 (+23)
420 (-22) | **-3.67%**
**+0.46%**
**-1.23%**
**+7.35%**
**+6.67%**
**-4.98%** | 577 (-22)
4,813 (+22)
85,605 (-1,063)
336 (+23)
368 (+23)
420 (-22) | **-3.67%**
**+0.46%**
**-1.23%**
**+7.35%**
**+6.67%**
**-4.98%** | 577 (-22)
4,813 (+22)
85,605 (-1,063)
336 (+23)
368 (+23)
420 (-22) | **-3.67%**
**+0.46%**
**-1.23%**
**+7.35%**
**+6.67%**
**-4.98%** | 577 (-22)
4,813 (+22)
85,605 (-1,063)
336 (+23)
368 (+23)
420 (-22) | **-3.67%**
**+0.46%**
**-1.23%**
**+7.35%**
**+6.67%**
**-4.98%** | 1 (0)
1 (0)
1 (0)
1 (0)
1 (0)
1 (0) | | **MathMock contract** | 167,014 (+3,206) | _log2_ | 645 (+21) | **+3.37%** | 645 (+21) | **+3.37%** | 645 (+21) | **+3.37%** | 645 (+21) | **+3.37%** | 2 (0) |