Skip to content

Commit

Permalink
improve performance for non-missings
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins committed Nov 26, 2018
1 parent c0f3f61 commit 720b24d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function copyto!(dest::CatArrOrSub, dstart::Integer,
seen = falses(length(levels(src))) # needed as we have to dynamically collect levels
@inbounds for i in 0:n-1
s = srefs[sstart+i]
if s == 0
if eltype(src) >: Missing && s == 0
if eltype(dest) >: Missing
drefs[dstart+i] = 0
else
Expand All @@ -447,7 +447,7 @@ function copyto!(dest::CatArrOrSub, dstart::Integer,
seen = falses(length(levels(src))) # needed as we have to dynamically collect levels
@inbounds for i in 0:n-1
s = srefs[sstart+i]
if s == 0
if eltype(src) >: Missing && s == 0
if eltype(dest) >: Missing
drefs[dstart+i] = 0
else
Expand Down

0 comments on commit 720b24d

Please sign in to comment.