-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Request
Currently DFA states are stored in an ordered map during generation. For each lookup this, has a complexity of logN, which starts to add up as the number of states increases. This is specifically an issue with large numbers of captures, as this causes the number of states to grow quickly. For example, with 50 variables, containing a total of 70 capture groups, the generation time takes ~10s.
Instead, using another data structure, most likely an unordered map, with fast insertion and lookup, would be ideal, as maintaining the order is not required.
Possible implementation
If no simpler data structure can resolve the issue:
- Create hash functions for the DFA state class, and its member's classes.
- Use an
unordered_mapor use existing hash libraries.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request