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

Optimizing parsers for arrays of constant-size elements without actions #125

Open
nikswamy opened this issue Jan 19, 2024 · 0 comments
Open

Comments

@nikswamy
Copy link
Contributor

If one writes UINT32 t[:byte-size n], we actually generate a while-loop to validate each UINT32 advancing by 4 bytes each time. This is inefficient, since one could instead just check that n % 4 == 0 and skip over the array.

We already have an optimized combinator for integer types without refinements or actions, see
EverParse3d.Actions.Base.validate_nlist_constant_size_without_actions, but the interpreter does not seem to use it.

We should enhance the 3D interpreter to use the computed kinds and target this optimized combinator, i.e., relying on parser_kind_is_constant_size in TranslateForInterpreter.fst

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

No branches or pull requests

1 participant