Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make map() and broadcast() faster for Union{T, Missing/Nothing} element types #25828

Merged
merged 1 commit into from
Feb 6, 2018

Commits on Jan 31, 2018

  1. Make map() and broadcast() faster for Union{T, Missing/Nothing} eltypes

    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.
    nalimilan committed Jan 31, 2018
    Configuration menu
    Copy the full SHA
    45545b6 View commit details
    Browse the repository at this point in the history