-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite of sum()*constant is suboptimal #169
Comments
@blegat, what was the motivation for the current design? Why not just rewrite inner loops only? |
JuMP has efficient |
I guess the design makes sense for linear/quadratic terms, but it really screws up the expression graph of nonlinear terms. |
JuMP also has an efficient |
@blegat asks to benchmark |
Consider:
All cases are troubling:
n
additional*
operationsn
additional/
operationsThis came up digging into this example in jump-dev/JuMP.jl#3106:
The first step brigs the denominator into the loop:
but then, even worse, it brings the
-
into the loop:a better outcome would be something along the lines of
The text was updated successfully, but these errors were encountered: