@lupyuen IMHO this article provided an old, boring but cannot-be-wrong conclusion:
the performance (of clone) depends on the actual workload.
The author listed some scenarios they think clone() is better. My knowledge is limited so I can’t comment much. I can say that if the memory-sharing is guarded by terribly designed locks, its performance will be worse than the naive clone() approach
@lupyuen This is very misleading. It highly depends on what you are cloning and how often at runtime (in a hot loop for example?)
Clone while learning or prototyping. Don't get stuck on premature optimization.
But cloning has a performance overhead and you should be aware of that when you want to release your code. Whether that overhead is significant is highly dependent on your specific code.
#RustLang