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

Specialize codegen for case of exactly one ink! message/constructor + that one being marked as wildcard #1046

Open
Tracked by #9354
cmichi opened this issue Nov 25, 2021 · 0 comments
Labels
A-ink_lang [ink_lang] Work item

Comments

@cmichi
Copy link
Collaborator

cmichi commented Nov 25, 2021

Follow-up to #1020.

There is a possibility to optimize our codegen for this case:

  • a contract containing exactly one ink! message (or constructor)
  • that one ink! message (or constructor) being marked with the wildcard selector

In that case of our codegen currently still creates dispatch code for both the wildcard selector, as well as the auto-generated four byte selector. We should specialize the codegen for this case, this will enable us to drop parts of the decoding of the selector and input parameters. This will decrease the Wasm size for contracts that match this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_lang [ink_lang] Work item
Projects
None yet
Development

No branches or pull requests

1 participant