Test name | Executions per second |
---|---|
Array.from() | 2425.0 Ops/sec |
Array.prototype.slice() | 2390.8 Ops/sec |
Spread operator | 2235.1 Ops/sec |
<script>
const ArrayTemplate = Array.from(Array(100000).keys())
</script>
const copy = Array.from(ArrayTemplate);
const copy = ArrayTemplate.slice()
const copy = [ArrayTemplate]