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
[perf] Create a flattened representation of DSLTree (#831)
This change simplifies the pre-compilation representation of the
regex to store a pre-order traversal of the syntax tree in an array
instead of an indirect enum. This enables an optimization pass that
can index into and mutate the tree more easily.
This change includes tests that verify that list-based compilation
generates the same instructions as the original tree-based
compilation, and switches to the list-based compilation. This
change also eliminates the "literal wrapper" node that preserved
AST – we aren't using the saved AST, so it resulted in unneeded
links in the chain.
Because parsing still generates an AST which is converted to a
DSLTree before the new list, regex compilation may be slower
until the intermediate DSLTree is fully removed.
0 commit comments