You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2025. It is now read-only.
Some benchmarks are needed to ensure what the problem is, but I’m pretty sure (given the current nom-3 implementation) that we have a lot of failures and retries.
The text was updated successfully, but these errors were encountered:
I've been exploring parsing GLSL expressions with the LALRPOP parser generator, combined with Logos as the lexer generator. Building the same AST is around 1300x (not a typo) faster with a lalrpop/logos than the current nom combinators:
Finished bench [optimized] target(s) in 0.07s
Parse expression/lalrpop
time: [3.9253 us 3.9293 us 3.9337 us]
Parse expression/glsl time: [5.1026 ms 5.1166 ms 5.1302 ms]
This should be taken with a grain of salt, since this is a very simple test (the nested_parentheses one), and running on my branch for #129. I'll see if I can validate those improvements over some other examples and against upstream, but it might be interesting to consider rewriting the parser.
Considering the other issues I've been working on, especially #129, adding location information to the AST would require changing a lot in the parser definition, so we might as well rewrite the parser with lalrpop and support span information at the same time.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Some benchmarks are needed to ensure what the problem is, but I’m pretty sure (given the current
nom-3
implementation) that we have a lot of failures and retries.The text was updated successfully, but these errors were encountered: