Multiple macros expansions with bindings results in exponential time complexity
Created by: andreypopp
Using code from master
branch.
Example macro
macro m {
rule { $val:expr } => {
var x = $val;
}
}
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
expands in 1.04s
While
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
expands in 5.34s
And after adding just a one more m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
m 11
in 10.26s
:(