Skip to content

Skipping empty strings #14

@edemaine

Description

@edemaine

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    efficiencyImproving efficiency of compiler or generated code

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions