Recopie tableau

Benchmark created on


Setup

const tableauOriginal = [1, 2, 3];

Test runner

Ready to run.

Testing in
TestOps/sec
slice
const copie = tableauOriginal.slice();
ready
opérateur de décomposition
const copie = [...tableauOriginal];
ready
Array.from()
const copie = Array.from(tableauOriginal);
ready
concat
const copie = [].concat(tableauOriginal);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.