-
Notifications
You must be signed in to change notification settings - Fork 93
Add nospecialize to some very highly specialized methods #2830
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
base: master
Are you sure you want to change the base?
Conversation
These cut 100k method instances. Still need to benchmark properly.
|
::Type{<:AbstractBridge}, | ||
::Type{<:MOI.AbstractFunction}, | ||
::Type{<:MOI.AbstractSet}, | ||
@nospecialize(BT::Type{<:AbstractBridge}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be safe
b::LazyBridgeOptimizer, | ||
::Type{BT}, | ||
) where {BT<:AbstractBridge} | ||
@nospecialize(b::LazyBridgeOptimizer), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these shouldn't affect performance, it's a must do indeed
::Type{S}, | ||
) where {F<:MOI.AbstractFunction,S<:MOI.AbstractSet} | ||
@nospecialize(model::AbstractModel), | ||
@nospecialize(F::Type{<:MOI.AbstractFunction}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one may be more dangerous
::Type{<:AbstractFunction}, | ||
::Type{<:AbstractSet}, | ||
@nospecialize(::ModelLike), | ||
@nospecialize(F::Type{<:AbstractFunction}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's a fallback returning false
, I don't believe it will affect the performance of bottleneck to looks good
x-ref #2829