Open dsyme opened 2 years ago
I will check this one.
The behaviour is definitely still present. A simple single-file program consisting of a linear chain of primitive calls (like f(f(f(f(.. ) has the following timing differences between the --optimize- and --optimize+ switches:
( I have failed to change this, unassigning myself and making this available to anyone who wants to take an alternative look)
While investigating #12420 I noticed that one particular part of our optimizer seems quadratic for very large nested expressions made of nothing but function/method applications, e.g.
M(M(M(M.....))))
and the kind of code that comes out of computation expressions.The problem is already noted in our code, see permalink
This isn't critical but we should fix this sometime. It appears to be re-traversing expressions determining free variables.