Open
Description
openedon May 3, 2024
These functions return equal types, but the compiler does not know a lot about the effects of f
, producing worse code:
julia> f() = Union{<:AbstractArray, <:Tuple}
f (generic function with 1 method)
julia> g() = Union{AbstractArray, Tuple}
g (generic function with 1 method)
julia> Base.infer_effects(f)
(?c,+e,!n,+t,+s,+m,+u)
julia> Base.infer_effects(g)
(+c,+e,+n,+t,+s,+m,+u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment