Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Clone Array - 07/02/2024
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Browser:
Chrome 124
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Spread operator clone
6054960.5 Ops/sec
Structured clone
344558.7 Ops/sec
Script Preparation code:
var arr1 = [1, 2, 3, , 5, 6, 7, 7, 8, 9, 10]; var arrCopy = null;
Tests:
Spread operator clone
arrCopy = [...arr1];
Structured clone
arrCopy = structuredClone(arr1);