In Rust, there are two methods to update the content of a slice from another slice: clone_from_slice() and copy_from_slice(). The behavior of these two functions are unsurprising - the first does a clone and expects the type to implement Clone, while the second does a copy and expects the type to implement Copy.
However, it surprises me that the documentation for clone_from_slice says this: "If T implements Copy, it can be more performant to use copy_from_slice." It is surprising that there should be a performance difference here. If T implements Copy, then .clone() is required to be equivalent to copying bits; however since the compiler knows what type T is, it should be able to figure out if it can do a bitwise copy even if I use clone_from_slice.
So where does the performance inefficiency arise from?