-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I'm new to this package, but I hit some performance bottleneck due to type instability. Particularly, RuleNode is not typed, so does get_executable (e.g.
Line 370 in 6c983e5
| root = (rulenode._val != nothing) ? |
By looking at
Lines 234 to 238 in 6c983e5
| mutable struct RuleNode | |
| ind::Int # index in grammar | |
| _val::Any #value of _() evals | |
| children::Vector{RuleNode} | |
| end |
RuleNode because we can know the type of _val from a grammar - if a grammar is specificed. This is actually done in the the codes below the struct definition.
Does it make sense to support such things, either in RuleNode or another new struct (e.g. TypedRuleNode?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels