Skip to content
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

Optimize access of struct fields in storage #249

Closed
cburgdorf opened this issue Feb 15, 2021 · 1 comment · Fixed by #676
Closed

Optimize access of struct fields in storage #249

cburgdorf opened this issue Feb 15, 2021 · 1 comment · Fixed by #676

Comments

@cburgdorf
Copy link
Collaborator

What is wrong?

When accessing struct fields in storage we are currently calculating storage pointers in YUL (which the optimizer doesn't optimize away)

expression! { (add([ptr], [offset])) }

How can it be fixed

  1. We could pre-calculate them
  2. Alternatively we might end up optimizing this another way as soon as we start storing structs tightly packed
@Y-Nak
Copy link
Member

Y-Nak commented Mar 11, 2022

will be resolved in #676
Both 1. and 2. will be realized.

@Y-Nak Y-Nak mentioned this issue Mar 11, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants