pub fn optimized_clone<T>(value: &T) -> Twhere T: Clone + 'static,
Optimize a clone operation by choosing between regular clone and Arc sharing