C # has the function of high performance copying arrays to copy arrays:
Array.Copy(source, destination, length)
This is faster than doing it manually, for example:
for (var i = 0; i < length; i++)
destination[i] = source[i];
I am looking for an equivalent high-performance function for copying arrays into place for Int32Array and Float32Array in Javascript and cannot find such a function:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
The closest is "copyWithin", which executes an internal copy inside the array.
Is there a built-in high-performance copy feature for TypedArrays?
Plan B, is there a built-in clone function with high performance? (EDIT: looks like slice () - answer to this question)