-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
deepcopy duplicates arrays #13124
Comments
This does seem to be a consistent change with the premise that deepcopy should be equivalent to serialize and deserialize. |
Agreed, though currently the serializer does not accurately record shared references to bits arrays. I found it impossible to get acceptable performance with strings when doing that. |
Could we special case strings since they're mutable in implementation but immutable in usage? |
I use Should |
Would your use-case really be messed up by not copying strings? That seems pretty benign to me since one shouldn't mutate the storage of strings. |
It's more the "value" than the "key" I'm worried about. E.g., |
I am a bit confused: I was not proposing any sharing between the original best, On Sat, Sep 26, 2015 at 4:09 PM Tim Holy [email protected] wrote:
|
I didn't read the test case carefully enough. Yes, that's a problem. Carry on 😄. |
To fix this issue, on line 59 of deepcopy.jl we can replace:
with
The text was updated successfully, but these errors were encountered: