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

Add the ability to share allocations during validation #760

Merged
merged 1 commit into from Sep 7, 2022

Conversation

alexcrichton
Copy link
Member

This commit adds API support to the function validation portion of
wasmparser to share allocations amongst validation of different
functions. This is done by adding a FuncToValidate step which is prior
to creating a FuncValidator and creation of a FuncValidator happens
when it's fused with a new type, FuncValidatorAllocations. The
allocations can be retrieved by consuming the validator as well.

Locally in the benchmarks this yields a 5-15% performance increase
depending on the benchmark.

Closes #714

This commit adds API support to the function validation portion of
`wasmparser` to share allocations amongst validation of different
functions. This is done by adding a `FuncToValidate` step which is prior
to creating a `FuncValidator` and creation of a `FuncValidator` happens
when it's fused with a new type, `FuncValidatorAllocations`. The
allocations can be retrieved by consuming the validator as well.

Locally in the benchmarks this yields a 5-15% performance increase
depending on the benchmark.

Closes bytecodealliance#714
@alexcrichton alexcrichton merged commit 95883ff into bytecodealliance:main Sep 7, 2022
@alexcrichton alexcrichton deleted the share-allocations branch September 7, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasmparser: Reuse allocations of the FuncValidator
2 participants