Closed avibryant closed 4 years ago
Marking this WIP because I'm realizing that it should distribute recursively instead of just the top-level LogLine.
Should I hold off reviewing for now then?
@andrew-stripe yes, thanks - it's going to get hairier, might as well wait until then.
closing this for now, will revisit later
Again on the theme of hoisting optimizations up into higher layers: previously, if we had something like
(x+1)(x+2) + (y+1)(y+2)
we would distribute out the multiplications before doing the sum. In the case thatx=y
, this will simplify nicely, but otherwise it just makes things worse.Now, we never do this automatically, but added a
distribute
method toReal
so you can request it if you know it will be a good idea.