Closed
Description
Reduced from RRTMGP.jl (except there, this has even more parameters and fields, and thus takes a few minutes longer)
julia> @time @eval struct S{FT<:AbstractFloat, A<:Union{Nothing, Val{FT}}, B<:Union{Nothing, Val{FT}}, C<:Union{Nothing, Val{FT}}, D<:Union{Nothing, Val{FT}}, E<:Union{Nothing, Val{FT}}, F<:Union{Nothing, Val{FT}}, G<:Union{Nothing, Val{FT}}}
a::A; b::B; c::C; d::D; e::E; f::F; g::G;
end
4.398847 seconds (5.38 M allocations: 2.002 GiB, 3.56% gc time)
Not certain there is anything we can do here, but opening this to record it, since it can be a bit of a surprising gotcha, although regardless of this, the runtime will still punish you pretty hard with bad performance everywhere because of those unions (e.g. #49725).