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

Skipping empty strings #14

Open
edemaine opened this issue Feb 8, 2024 · 1 comment
Open

Skipping empty strings #14

edemaine opened this issue Feb 8, 2024 · 1 comment
Labels
efficiency Improving efficiency of compiler or generated code

Comments

@edemaine
Copy link
Collaborator

edemaine commented Feb 8, 2024

Here's a small idea for Hera optimization: skip matching the empty string literal "". We use this ~70 times in the Civet grammar, mostly for declarative rules, which I imagine get hit a lot (you probably know better).

Given that it always matches, we shouldn't need to build/call $L at all. I think this optimization could be in compileOp but I haven't understood this code yet to know how to try it.

@edemaine edemaine added the efficiency Improving efficiency of compiler or generated code label Feb 8, 2024
@STRd6
Copy link
Collaborator

STRd6 commented Feb 9, 2024

I think it's a good idea in principle but it is made difficult by the need to aggregate handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
efficiency Improving efficiency of compiler or generated code
Projects
None yet
Development

No branches or pull requests

2 participants