-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
warnings for some common performance traps #480
Conversation
3c753c0
to
d72d9d0
Compare
Added void returns to avoid unnecessary allocations, otherwise don't see any performance regressions |
warnings for some common performance traps
This doesn't play nicely with the vectorized stuff, which uses this fallback. using JuMP
A = rand(250,250)
B = rand(250,250)
b = rand(250)
m = Model()
@defVar(m, x[1:250])
@addConstraint(m, A*x + B*x .<= b) # gives warning |
Hmm, any suggestions on how to improve the warning? Bump the threshold for |
Actually I think the real problem should be in the |
But yeah, bumping it up seems prudent as well. |
This particular instance is fixed with dac3402 |
At least the warnings help us find cases where we're doing too much operator overloading. |
The example above still gives warnings on v0.3 |
(because |
Hmm. We could disable the performance warnings on 0.3. |
I'm gonna see if I can do something clever here, but otherwise yeah, let's do that and bump up the counter too. |
This covers some of the common cases but not everything. I think we should wait for user feedback before expanding the scope of performance warnings like this.