I am looking to use Julia for a high performance application where I need to iterate through many items. The items can be of various types, but those types are all concrete. I can make a union of those types. It appears to me that Julia is optimizing this data structure and is using C unions to make access fast. Moreover, if I allocate a vector with a union with concreate types using the undef constructor I get a vector with data (which indicates to me that Julia is using C unions and not storing locations to pointers). However, if I check if a vector of unions isbits it returns false. Same for isconcretetype. Why is this the case?
julia> using InlineStrings
julia> #show that it is allocated when using undef
println(Vector{Union{Int64, String31}}(undef, 10))
Union{Int64, String31}[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
julia> println(isconcretetype(Union{Int64, String31}))
false
julia> println(isbitstype(Union{Int64, String31}))
false
julia> println(isbits(Vector{Union{Int64, String31}}))
false