julia
2d397673 - Make map() and broadcast() faster for Union{T, Missing/Nothing} eltypes (#25828)

Commit
8 years ago
Make map() and broadcast() faster for Union{T, Missing/Nothing} eltypes (#25828) Storing typeof(el)/eltype(B) in a variable in the hot part of the loop kills performance because despite being inferred as equal to Union{Type{T}, Type{Missing/Nothing}}, it is marked as ::Any. Only using typeof()/eltype() when isa() fails works around the problem and makes map/broadcast(x->x, ::Vector{Union{Int, Missing}}) about 10 times faster.
Author
Committer
Parents
Loading