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

Wasm gas: Stop charging for "empty" instructions #1245

Open
Stebalien opened this issue Dec 9, 2022 · 1 comment
Open

Wasm gas: Stop charging for "empty" instructions #1245

Stebalien opened this issue Dec 9, 2022 · 1 comment
Milestone

Comments

@Stebalien
Copy link
Member

Specifically, stop charging for:

  • Const instructions.
  • Cast instructions (that don't sign-extend).
Stebalien added a commit that referenced this issue Dec 9, 2022
Stebalien added a commit that referenced this issue Dec 9, 2022
Stebalien added a commit that referenced this issue Dec 9, 2022
Stebalien added a commit that referenced this issue Dec 9, 2022
Stebalien added a commit that referenced this issue Dec 9, 2022
Stebalien added a commit that referenced this issue Dec 11, 2022
We now explicitly charge for individual instructions, and reject
unsupported ones.

Additionally, this patch:

1. Makes consts and basic casts free (fixes #1245).
2. Makes register operations free (locals/globals).
3. Charges 100gas per memory access (10ns). This is based on normal DDR4
memory latency.
4. Charges 0.5gas per byte copied (fills and bulk copy). This is based
on our previous memcpy benchmarks.
Stebalien added a commit that referenced this issue Dec 19, 2022
We now explicitly charge for individual instructions, and reject
unsupported ones.

Additionally, this patch:

1. Makes consts and basic casts free (fixes #1245).
2. Makes register operations free (locals/globals).
3. Charges 100gas per memory access (10ns). This is based on normal DDR4
memory latency.
4. Charges 0.5gas per byte copied (fills and bulk copy). This is based
on our previous memcpy benchmarks.
@maciejwitowski
Copy link
Contributor

@Stebalien can you set milestone and priority?

@Stebalien Stebalien added this to the M2.2 milestone Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants