This is related to: How do I pass the value instead of the refererence of an array?
I need to send the value instead of reference to an array. To that question I got 2-3 valid answers. One was use slice, second (and third was similar) was to use clone or make my own clone function.
From a (very) quick test, it seems like slice was faster (tested on a 100,000 elements array). But I don't have any explanation for that.
Can anyone clarify if and why is slice faster?