by pragueexpat · 9y ago · 0 comments
Very few languages that I know have deep cloning outside of some sort of serialization hack anyway (C#'s deep cloning is a reuse of/leftover from binary marshalling), so this is roughly par for the course, so far as I'm aware.
Relatively short, but IMO not relatively performant. All the JSON encoding/decoding takes its toll.
Obviously YMMV, and your performance needs likely differ from my own.
(Personally, at this point I try to use immutability [with ImmutableJS or friends] over deep cloning, but sometimes a deep clone is still handy.)