Skip to content

Commit 8b0d0f6

Browse files
deepcopy optimization: return bits types immediately.
1 parent 5807658 commit 8b0d0f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

base/deepcopy.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function deepcopy_internal(x, stackdict::ObjectIdDict)
2727
end
2828

2929
function _deepcopy_t(x, T::DataType, stackdict::ObjectIdDict)
30-
isempty(T.names) && return x
30+
isbits(T) | isempty(T.names) && return x
3131
if T.mutable
3232
y = ccall(:jl_new_struct_uninit, Any, (Any,), T)
3333
stackdict[x] = y

0 commit comments

Comments
 (0)