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 }}
Repository navigation
Optimize symbolic regex Antimirov mode to avoid so much allocation #60918
When in Antimirov mode, we logically maintain a list of states we're currently in and, for each step, generate a new list of states based on looking at each current state and determining all the states it could lead us to. However, rather than something like:
it's implemented using an immutable SymbolicRegexNode, where every additional state found involves unioning in the new state into the next states node, which means generating one or more new nodes for each additional state we union in.
Yes, started but got sidetracked a bit, will try to get this done soon (within a few days), essentially improving the overhead in the Antimirov mode, regarding state-set representation (using a more lightweight def, initially just HashSet<int>, Olli has then in mind a specialized very efficient "small integer set" data structure (similar to what is in use for NFA simulation ie Antimirov-like mode, in other tools like re2) to optimize further and can swap that out then.)
Activity
stephentoub commentedon Dec 10, 2021
@veanes, I believe you're working on this or a very related optimization, right?
veanes commentedon Dec 10, 2021
Yes, started but got sidetracked a bit, will try to get this done soon (within a few days), essentially improving the overhead in the Antimirov mode, regarding state-set representation (using a more lightweight def, initially just
HashSet<int>, Olli has then in mind a specialized very efficient "small integer set" data structure (similar to what is in use for NFA simulation ie Antimirov-like mode, in other tools like re2) to optimize further and can swap that out then.)veanes commentedon Feb 21, 2022
The PR #65637 should fix this issue, once this has been validated.