This patch improves match performance for patterns of the form
_ ... p_1 ,,, p_n . _ ...
by introducing an AST rewrite rule to detect and replace them with a new type of node which can be compiled to more efficient code. This appears in meander.match.syntax.epsilon/expand-prt in Clojure and is semantically equivalent to the following Meander rewrite expression
see dramatic performance improvement as they no longer use meander.util.epsilon/partitions as the search space and, instead, simply use the input sequence itself. Thus, the resulting code is much more like a typical filter.
This patch improves match performance for patterns of the form
by introducing an AST rewrite rule to detect and replace them with a new type of node which can be compiled to more efficient code. This appears in
meander.match.syntax.epsilon/expand-prt
in Clojure and is semantically equivalent to the following Meander rewrite expressionThe performance increase for patterns of the form
see dramatic performance improvement as they no longer use
meander.util.epsilon/partitions
as the search space and, instead, simply use the input sequence itself. Thus, the resulting code is much more like a typical filter.