Skip to content

Commit

Permalink
deepcopy optimization: return bits types immediately.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Oct 2, 2014
1 parent 5807658 commit 8b0d0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/deepcopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function deepcopy_internal(x, stackdict::ObjectIdDict)
end

function _deepcopy_t(x, T::DataType, stackdict::ObjectIdDict)
isempty(T.names) && return x
isbits(T) | isempty(T.names) && return x
if T.mutable
y = ccall(:jl_new_struct_uninit, Any, (Any,), T)
stackdict[x] = y
Expand Down

0 comments on commit 8b0d0f6

Please sign in to comment.