-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gas examples: storeAddress via storage #1158
Conversation
|
|
d749f51
to
b7a8e34
Compare
#1061 (review) I should've started with this
This is comparing storeAddress as a method (optimized to not pass in
msgSender
for a better comparison)to storeAddress as a storage variable
storage seems almost universally better. We pay ~1000-1500 up front, but get ~500-1000 less gas on each subsequent table interaction. So as long as you read/write more than like twice, it evens out and then keeps getting cheaper
the code is a mess, this is just a gas comparison. I'll continue the PR in #1061