Closed MilesCranmer closed 1 month ago
Right now the function
using DispatchDoctor @stable f(a, t::Type{T}) where {T} = sum(a; init=zero(T))
is not classified as stable, even though it is. This is because of weird specialization rules: https://docs.julialang.org/en/v1.10/manual/performance-tips/#Be-aware-of-when-Julia-avoids-specializing
To fix this, this PR moves back to a closure approach. This simplifies a lot of other things too and doesn't hurt performance.
This also makes it possible to use Vararg-args.
Vararg
Right now the function
is not classified as stable, even though it is. This is because of weird specialization rules: https://docs.julialang.org/en/v1.10/manual/performance-tips/#Be-aware-of-when-Julia-avoids-specializing
To fix this, this PR moves back to a closure approach. This simplifies a lot of other things too and doesn't hurt performance.
This also makes it possible to use
Vararg
-args.