makerdao / dss-auto-line

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

Gas saver #1

Closed nanexcool closed 4 years ago

nanexcool commented 4 years ago

Test before merging, but this should reduce the number of SLOADs significantly. Not only because we save everything on one slot, but because I think (need to test) on run every time you do ilks[ilk] it does an SLOAD. By preloading with Ilk storage i = ilks[ilk]; every other time you call i it uses MLOAD :)

brianmcmichael commented 4 years ago

Closing for now. This has deviated from the current implementation and we've added some changes inspired by this at https://github.com/makerdao/dss-auto-line/pull/3